Re: Checking if framework exists
Re: Checking if framework exists
- Subject: Re: Checking if framework exists
- From: Jeff LaMarche <email@hidden>
- Date: Tue, 6 Sep 2005 08:50:06 -0400
Check if WebKit is available:
+ (BOOL)isWebKitAvailable
{
static BOOL _webkitAvailable=NO;
static BOOL _initialized=NO;
if (_initialized)
return _webkitAvailable;
NSBundle* webKitBundle;
webKitBundle = [NSBundle
bundleWithPath:@"/System/Library/Frameworks/WebKit.framework"];
if (webKitBundle)
_webkitAvailable = [webKitBundle load];
_initialized=YES;
return _webkitAvailable;
}
I check this in applicationDidFinishLaunching.
Although MusicKit is not usually going to be installed in /System/
Library/Frameworks... it's probably going to be in ~/Library/
Frameworks/ or /Library/Frameworks, so you would need to tweak this
method a bit...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden