Tuesday, October 23, 2012

Adding to the XCode "Open Developer Tool" Menu

UPDATE: This tweak actually disappears (along with the apps you copy inside XCode) whenever XCode is updated!

In spite of the agony that comes every time Apple changes where XCode and its friends live, I like the direction they're going. Now everything's bundled neatly inside the XCode app itself... almost.

Today I wanted to use the handy OpenGL Shader Builder app that I remembered from a long time ago, but to my dismay I realized it wasn't installed. As of this writing, XCode had cleverly bundled its extra apps inside the XCode app as well - you can access them by going to XCode -> Open Developer Tool. As the Shader Builder wasn't there, the "More Developer Tools..." option took me to the somewhat sluggish developer download site, where I was able to log in and download the tools I wanted.

Now the tricky part, and where my OCD kicks in. I like the direction Apple took in bundling these inside XCode, so I'd like these new ones in the same place. After a wee bit of hacking, I figured out how to do this and add them to XCode's menu. As no one after a quick google search seems to document this, I thought I should:
  • Quit XCode
  • In the Finder, navigate to the XCode app and "Show Package Contents"
  • Copy aliases of the new apps into Contents/Applications/ (you'll be prompted for your password)
  • Add lines to Contents/Resources/IDEHelperApps.plist for each new app you add
    • This can be a little tricky with permissions - an easy way to do it is copy the file to the desktop, and copy back, overwriting the original
  • Open XCode again, and presto! Your new apps are in the menu: