Re: Loading a private framework from a plug-in (Spotlight)
Re: Loading a private framework from a plug-in (Spotlight)
- Subject: Re: Loading a private framework from a plug-in (Spotlight)
- From: Eric Albert <email@hidden>
- Date: Mon, 19 Feb 2007 21:24:05 -0800
On Feb 19, 2007, at 9:14 PM, Peter O'Gorman wrote:
On Feb 20, 2007, at 1:57 PM, Philippe Casgrain wrote:
To avoid this code duplication, I see three possibilities:
1. Load the FileIO.framework manually from the Spotlight plugin.
Is that possible?
2. Switch my FileIO.framework to a FileIO.dylib (and use dlopen(),
etc...).
3. Make my framework globally-visible, by installing it in /
Library/Frameworks (or ~/Library/Frameworks)
Does anybody know if (1) is possible? I'd rather not switch to a
dylib, if possible, since this is scheduled for a Service Pack and
changing then bundle layout in a SP is a bigger can of worms...
You do not have to change the bundle layout for dlopen to work.
dlopen("/Path/to/Frameworks/foo.framewor/foo",RTLD_GLOBAL); should
"just work".
And of course you wouldn't want to hardcode the path. Instead, look
up your application by bundle ID via Launch Services and construct a
path relative to its location. You can also use CFBundle instead of
dlopen and friends if you'd prefer a more CF-y API.
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden