• 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: Framework soft link (optional install)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framework soft link (optional install)


  • Subject: Re: Framework soft link (optional install)
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 13 Jan 2010 20:26:42 -0800

2010/1/13 Trygve Inda <email@hidden>:
> How can I compile/link my code so that the framework effectively has a soft
> link? I will need to check for the presence of the framework at runtime, and
> if it is not there, avoid calling into it, but if the user has added it, the
> functionality would be available.

Weak link the framework, according to the details here:
http://developer.apple.com/mac/library/DOCUMENTATION/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

Note that there is no direct ObjC analogue for the NULLing function
symbol behavior (at least not yet; see
http://sealiesoftware.com/blog/archive/2009/09/09/objc_explain_Weak-import_classes.html
for a glimpse into the future). At the moment, you can use
NSClassNamed to get at the classes you need, then shove them off into
a variable and check for non-Nilness.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Framework soft link (optional install) (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Framework soft link (optional install)
  • Next by Date: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • Previous by thread: Re: Framework soft link (optional install)
  • Next by thread: Tutorial on writing a Cocoa/Mac app.
  • Index(es):
    • Date
    • Thread