2010/1/13 Trygve Inda <cocoa...@xericdesign.com>: > 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com