views:

770

answers:

2

I have created IB kit plugin now i want to use that plugin in other Xcode project

how to do that? I have tried developers guide but not able to get that done ..please answer

A: 

First of all, I assume that you want your plug-in to be embedded within your application's bundle. If not, you can place the IBPlug-in framework in a standard location like /Library/Frameworks.

Creating the Plug-in

Once you have an IBPlugin project created in XCode using Apple's template, you need a little tweak:

  • Change the name of your framework target so it differs from the Plug-in's. For instance, you could call it MyIBPluginFramework.
  • In the Target Properties > Build : Modify the Installation Directory of MyIBPluginFramework to @loader_path/../Frameworks.
  • Also set its Dynamic Library Install Name to @executable_path/../Frameworks/$(CONTENTS_FOLDER_PATH)/$(PRODUCT_NAME).
  • Set the Installation Directory of MyIBPlugin to @loader_path/../Frameworks/Resources.

(when built, the plug-in is placed in the Resources directory of the framework).

At this point, it should work both in Interface Builder and in IBCocoaSimulator.

Embedding in an application

Drag the IBPluginFramework.framework folder to the Linked Frameworks group of the application's project. Edit your application target: append to Frameworks Search Paths the path @loader_path/../Frameworks/MyIBPluginFramework/Resources.

You're now able to link against the framework and the plug-in, but the framework must be copied to the Frameworks directory of your application when building. Add a Copy Files phase to your target, and drag the framework into.

I cannot garantee success (I managed to make mine work, but might have forgotten to relate a step here), but you're given the big lines.

Renaud Pradenc
A: 

I thought that usually you put plugins in to the application specific folder found in the Library folder either at the root or user level, e.g.

/Library/Interface Builder 3.0/

On my system I have another folder under that called "Library", and under that called "User Objects" which is empty.

So I would try putting it in each of these folders in turn, restarting XCode and Interface Builder each time (just to be sure)

  • /Library/Interface Builder 3.0/
  • /Library/Interface Builder 3.0/Library
  • /Library/Interface Builder 3.0/Library/User Objects

Hope that helps.

brindy