Capture the hammer - create your own plug-ins for Xcode
Objective-C may be your favorite programming language - but that does not mean that XCode is your favorite IDE, right? If you could only change little bits of Xcode's functionality here and its UI there... turns out that you can! Xcode does, in fact, have an undocumented plug-in interface. The problem with that interface, however, is that you do have to restart Xcode every time you recompile your plug-in. This is especially annoying while you are developing the plugin - you lose most of your valuable time in restarting your IDE.
This is where our Xcode plug-in suite comes into play: we give you one plugin that defines a lightweight interface and a base class for all other plug-ins and acts as a gatekeeper between Xcode and your code (pun fully intended). If you change your code and recompile your plug-in you can just dynamically unload the old version and load the new version without interrupting your work. Try it - it really sounds more complicated than it is.
How does it work?
Just download our plug-in suite, install our XCPluginLoader plug-in, and use our XCPUnloadablePlugin framework to develop your own Xcode plug-ins. It doesn't get much easier.
- Get the plug-in suite
- Copy XCPluginLoader.pbplugin to
- Check out our example framework - have a look at the code and compile and run to see how it works
- Use the XCPUnloadablePlugin.framework to develop your plug-in.
- Your principal class should inherit from XCPUnloadablePlugIn which is provided by the framework
- Your plug-in must be compiled with support for garbage collection (because Xcode runs in a garbage collected environment)
- You must set the runpath search paths correctly (see our demo project)
- Relaunch Xcode to load our plug-in, then select PlugIn Loader from the PlugIns menu to load your plug-in
- Done. Your custom plug-in is now running under Xcode!
But wait, there's more...
- If you want to reload your plug-in code open up the plug-in loader window, uncheck your plugin, wait until it has finished unloading and just load again. Beats restarting Xcode every 2 minutes, uh?
That's why you've read through all this... go ahead and download the Xcode plug-in suite!