Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > What I learned from installing Safari v80

What I learned from installing Safari v80
Thread Tools
Dedicated MacNNer
Join Date: Nov 2002
Status: Offline
Reply With Quote
Jun 14, 2003, 09:38 PM
 
You probably noticed that Safari v80's installer requires a password and a reboot. Turns out the reason why is that it is not only adding the WebCore and JavaScriptCore frameworks to your system, but it is also modifying Foundation.framework itself (thus the need for the restart).

I discovered this in an unlikely way when I tried to build GNUMail and Project Builder shat out a build error, saying "can't find NSURLError.h". At first I was like "wtf, the GNUMail headers must be befux0red" but then I realized the #import <Foundation/NSURLError.h> was in Foundation.h itself.

That's ODD, I thought; why would Foundation.h include a header it didn't have, and why did this never pop up before? So I went looking for NSURLError.h and couldn't find it anywhere. I then had the bright idea of taking a gander at the Foundation.h on my dad's machine downstairs, running 10.2.6.

The first thing I noticed was that there was a big section of includes in my Foundation.h that weren't present in his, namely:

Code:
// Note: To use the APIs described in these headers, you must perform // a runtime check for Foundation-462.1 or later. #import <AvailabilityMacros.h> #if defined(MAC_OS_X_VERSION_10_2) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2) #import <Foundation/NSURLAuthenticationChallenge.h> #import <Foundation/NSURLCredential.h> #import <Foundation/NSURLCredentialStorage.h> #import <Foundation/NSURLProtectionSpace.h> #import <Foundation/NSURLCache.h> #import <Foundation/NSURLConnection.h> #import <Foundation/NSURLProtocol.h> #import <Foundation/NSURLRequest.h> #import <Foundation/NSURLResponse.h> #import <Foundation/NSHTTPCookie.h> #import <Foundation/NSHTTPCookieStorage.h> #import <Foundation/NSURLDownload.h> #import <Foundation/NSURLError.h> #endif
Notice they all have to do with http/URL handling. The offending one is at the bottom, the rest of the headers are present (and not present on my dad's machine). Foundation itself carries a change date of 6/9/03 instead of 4/14/03 like his and has grown from 1.6 mb to 2 mb. Here's what I can conclude:

Conclusion 1) As Safari v80 is an in-house development build, it links against (and installs) the latest bleeding-edge Foundation.framework that Apple is using, one which we will probably not see till 10.2.7. As it is a dev build also, they probably didn't take too much care with the installer, and forgot to install one header along with all the other ones they added.

Conclusion 2) The presence of all these new headers means certain http and URL facilities have been added to the Foundation framework itself, and are not simply a part of WebCore/JavaScriptCore. This is more interesting, as it is a slight peek into what may be ahead in future OS X releases and should be enticing to developers writing networking-related apps.

Conclusion 3) If you are having this problem, just comment out either that entire section or the one faulty include, and go ahead and use PB like before. I just commented out that include, and am busy searching for anyone who has a copy (probably only people inside Apple) so I can play with all of these new Foundation classes.

The end.
I offer strictly b2b web-based server-side enterprise solutions for growing e-business trusted content providers ;]
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 15, 2003, 02:57 AM
 
Originally posted by trusted_content:
I just commented out that include, and am busy searching for anyone who has a copy (probably only people inside Apple) so I can play with all of these new Foundation classes.
Have you tried class-dumping it?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jun 15, 2003, 04:34 AM
 
Originally posted by trusted_content:
Conclusion 1) As Safari v80 is an in-house development build, it links against (and installs) the latest bleeding-edge Foundation.framework that Apple is using
Actually, I highly doubt that 462.1 is "bleeding-edge". The current version is 462. This is not a major leap into the future, just adds some APIs that WebKit depends on.

one which we will probably not see till 10.2.7
I don't see any reason why they couldn't just install it as part of Safari 1.0. They probably wouldn't install the headers, instead making you download a Safari SDK. Just making guesses here, though

This is more interesting, as it is a slight peek into what may be ahead in future OS X releases
What's so exciting about this? I think most of this type of stuff has existed in CFNetwork since 10.2...

And by the way, I doubt that NSURLError.h contains a "NSURLError" class, it's probably lots of constants and enums.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:42 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2