Loading a private framework from a plug-in (Spotlight)
Loading a private framework from a plug-in (Spotlight)
- Subject: Loading a private framework from a plug-in (Spotlight)
- From: "Philippe Casgrain" <email@hidden>
- Date: Mon, 19 Feb 2007 23:57:13 -0500
- Thread-topic: Loading a private framework from a plug-in (Spotlight)
I have a private framework ("FileIO.framework"), which is embedded in my app bundle. The framework is built with an install path of "@executable_path/../Frameworks/": it works great with my application, and is reusable in other applications. Here is a summary of the bundle layout:
Contents/
Frameworks/
FileIO.framework/
FileIO* ->
Headers ->
Resources ->
Versions/
A/
FileIO*
Headers/
Resources/
Current ->
Library/
Spotlight/
MySpotlightPlugin.mdimporter/
(etc)
MacOS/
MyApp*
As you can see, I have an embedded Spotlight Plugin (folder Library/Spotlight/MySpotlightPlugin.mdimporter). I would like for this plugin to use my private "FileIO.framework" instead of the current solution of linking in static code in the plugin, which duplicates FileIO code in two places.
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...
Thanks,
Philippe
_______________________________________________
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