Migrating to Xcode 4 tips


#1

I have just finished migrating to a compete Lion Xcode 4.3.2 setup and thought I would share some tips with you. The new unified workspace idea gets a bit annoying if you have a small screen like me and prefer Xcode 3’s separate build results and console windows.

Console Window

  • Open the behaviour window from the menu bar: Xcode -> Behaviours -> Edit Behaviours
  • Open the ‘Run Starts’ pane
  • Tick ‘Show Tab’ and add a name such as ‘Console’
  • Once you run the product a new tab will appear, drag it out to make a new, separate window

Now we need to change the window’s display to show just the console:

  • Hide the Navigator and Utilities panes under the ‘View’ options
  • Drag the console area to the top of the window so it occupies the whole space
  • Click the ‘Show only console’ button in the top-right to get rid of the variables view
  • Hide the toolbar by option + clicking and choose ‘Hide Toolbar’

Build Results

  • Open the behaviour window: Xcode -> Behaviours -> Edit Behaviours
  • Open the ‘Build Starts’ pane
  • Tick ‘Show Tab’ and add a name such as ‘Build Results’
  • Tick the ‘Navigate to’ option and select ‘current log’
  • Once you run the product a new tab will appear, drag it out to make a new, separate window

Now we need to change the window’s display to show the results and related code when we click on an issue:

  • Hide the Navigator, Debug Area and Utilities panes under the ‘View’ options
  • Go to ‘View’ menu and the ‘Assistant Editor’ sub-menu, select ‘Show Assistant Editor’
  • Again go to the ‘View’ and the ‘Assistant Editor’ sub-menu, select ‘All Editors Stacked Vertically’
  • Hide the toolbar by option + clicking and choose ‘Hide Toolbar’

Build Products
By default the index data and build products are located under ‘~/Library/Developer’. They can get pretty out of hand unless you check the location regularly. I prefer to have mine in the old locations, relative to the project file.

Open the ‘Preferences’ menu and go to the ‘Locations’ pane.
Change the ‘Derived Data’ option to ‘Relative’

It should now be a lot easier to find your build products and delete them if necessary. There are some advanced options here if you want to play but the defaults are fine for my needs.

Quick Look Syntax Highlighting
For some annoying reason the quick look plugin that gives and Xcode editor view to code isn’t present in Lion and the old plugin won’t work if you copy it. I’ve found a 3rd party plugin which does a pretty good job though called QLColourCode.

Just extract it and copy the plugin file to ‘/Library/QuickLook’.