Recently I've noticed a couple of projects on github that extend the functionality of Xcode 4 via plugins.
Two projects as examples by @olemoritz:
Both projects are installed into ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins
and Xcode just picks them up.
Are there any sources of documentation (officlal or user generated) on extending Xcode?
Edit: ping @olemortiz ;)
In Xcode, select your project or package in the Project navigator. Choose File > New > File to open the file template chooser. Select the Documentation Catalog template in the Documentation section and click Next. Enter a filename and click Create.
Xcode For IDEIt is the only IDE with which you can easily create applications for IOS and Mac OS. It supports the new Apple swift language. You can create applications visually, you just need to write code.
Overview. Xcode consists of a suite of tools that developers use to build apps for Apple platforms. Use Xcode to manage your entire development workflow — from creating your app to testing, optimizing, and submitting it to the App Store.
As I wrote those plugins you mentioned, here are some pointers:
There is no official documentation from Apple, so while Xcode does have a plugin infrastructure, it is entirely private API. (but hey, no one wants to submit Xcode plugins to the App Store, right? ;)) – The usual warnings apply: You should code very defensively, and it's possible that Xcode updates break things. Any plugin can bring Xcode down entirely, so be careful.
There is a seemingly abandoned effort to document the plugin interface here.
There are some open source projects that allow you to see what's needed to get a plugin loaded at all, e.g. mine and there's CLITool-Infoplist (I think that's where I got the basic structure from, but I can't really remember, because I've been doing this without publishing anything for quite a while).
You can use class-dump to generate headers from Xcode's private frameworks, e.g. IDEKit and IDEFoundation (in Xcode.app/Contents/Frameworks
). Reading those gives you quite a bit of information on how Xcode is structured internally. DVTKit and DVTFoundation (in Xcode.app/Contents/SharedFrameworks
) can also be useful to class-dump.
You can observe all notifications that are sent in Xcode by registering an observer for nil
. I initially just logged all those notifications to get an idea of where I might be able to hook into.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With