On Oct 2, 2010, at 1:57 AM, Rick Mann <rm...@latencyzero.com> wrote: > I do have another question. I will ship my app with a number of built-in > plug-ins, but I also want the user to install additional plug-ins, or even > write their own. Those plug-ins need to find my app's Framework, both for > building and execution. How do I handle that? > > Does the Framework need to be pulled out of the .app and put somewhere more > global? That would require an installer, which I'd like to avoid, if at all > possible.
Nope, this is also handled by the install name. When building their plugin, the linker will look at the install name of your framework and copy that into the user's plugin library. For example, if MyFramework lives in your app bundle, it should have an install name of '@executable_path/../Frameworks/MyFramework.framework/MyFramework'. When the user builds their plugin dylib, the linker will copy this install name as "this is where I should look for this dylib." At runtime, when your app loads the plugin dylib, dyld will enumerate all the linked libraries, see the entry for MyFramewok, expand the @executable_path macro in its install name, and thus find MyFramework. HTH, --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