• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Checking if framework exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Checking if framework exists (From: Sanri Parov <email@hidden>)
 >Re: Checking if framework exists (From: eltima <email@hidden>)

  • Prev by Date: Re: Checking if framework exists
  • Next by Date: iTunes playlist icons
  • Previous by thread: Re: Checking if framework exists
  • Next by thread: Re: Checking if framework exists
  • Index(es):
    • Date
    • Thread