Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>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 <code>/Library/Frameworks</code>.</p> <h2>Creating the Plug-in</h2> <p>Once you have an IBPlugin project created in XCode using Apple's template, you need a little tweak: </p> <ul> <li>Change the name of your framework target so it differs from the Plug-in's. For instance, you could call it MyIBPluginFramework.</li> <li>In the Target Properties > Build : Modify the Installation Directory of MyIBPluginFramework to <code>@loader_path/../Frameworks</code>. </li> <li>Also set its Dynamic Library Install Name to <code>@executable_path/../Frameworks/$(CONTENTS_FOLDER_PATH)/$(PRODUCT_NAME)</code>.</li> <li>Set the Installation Directory of MyIBPlugin to <code>@loader_path/../Frameworks/Resources</code>.</li> </ul> <p>(when built, the plug-in is placed in the Resources directory of the framework).</p> <p>At this point, it should work both in Interface Builder <strong>and</strong> in IBCocoaSimulator.</p> <h2>Embedding in an application</h2> <p>Drag the IBPluginFramework.framework folder to the <code>Linked Frameworks</code> group of the application's project. Edit your application target: append to Frameworks Search Paths the path <code>@loader_path/../Frameworks/MyIBPluginFramework/Resources</code>.</p> <p>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 <code>Copy Files</code> phase to your target, and drag the framework into.</p> <p>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.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload