Re: Prevent plug-ins from having framework conflicts.
Re: Prevent plug-ins from having framework conflicts.
- Subject: Re: Prevent plug-ins from having framework conflicts.
- From: Kyle Sluder <email@hidden>
- Date: Tue, 4 May 2010 10:55:19 -0700
On Tue, May 4, 2010 at 10:22 AM, Carmen Cerino Jr. <email@hidden> wrote:
> I am currently writing a plug-in framework for my application. I would like
> to be able to release plugins without having to update my application, and I
> intend on making the framework available for third party plugins. I am
> currently running into issues when two plugins ship with identical
> frameworks. When the plugins are loaded the runtime gets confused because
> the framework gets loaded twice. What is the best way to mitigate this
> issue?
Plugins need to not do that. If they share a framework, that framework
needs to be part of the app bundle rather than the plugin. If they are
two unrelated plugins that happen to use the same library, then they
need to compile that framework in such a way that the symbols don't
conflict.
We have a few similar scenarios. We define a macro like
PLUGIN_NAME=FooPlugin and all of our headers are written like this:
// Warning: written in compose window
#define PLUGIN_SYMBOL_NAME(sym) PLUGIN_NAME##sym
@interface PLUGIN_SYMBOL_NAME(CommonClass) : NSObject
{ ... }
--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