Re: App works in debugger, won't launch in Finder
Re: App works in debugger, won't launch in Finder
- Subject: Re: App works in debugger, won't launch in Finder
- From: Kyle Sluder <email@hidden>
- Date: Sat, 2 Oct 2010 07:59:29 -0700
On Oct 2, 2010, at 1:57 AM, Rick Mann <email@hidden> 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 (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