Xcode Plug-Ins

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 ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-Ins
  • 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?

Download

That's why you've read through all this... go ahead and download the Xcode plug-in suite!

Who's to blame for this?

The plug-in suite was developed by Leo, Tho and JP. If you have any problems or suggestions for improval please let us know!

Attachments:
File Description File size Downloads Last modified
Xcode plugin suite.dmg   1820 kB 2463 2010-05-26 18:54
Xcode plugin suite v2.dmg   97 kB 2710 2011-05-06 16:20

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.