Xcode Tips 💡

The more you know... 😎

⬅️ Go Back

✏️ Contribute

Settings

Display Build Times in Xcode

This replaces the time the “build finished” with how long the build took.

defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES

Source: Paul Hudson, Dave Verwer

Customizing the file header comment and other text macros

Xcode allows you to customize the file header and other so-called text macros using a plist file.

  1. Create a property list file named IDETemplateMacros.plist.
  2. For every text macro you want to customize, add a new key to the plist’s dictionary.
  3. Copy the file to one of the following locations.
    1. <Name>.xcodeproj/xcshareddata/
    2. <Name>.xcworkspace/xcshareddata/

Source: Ole Begemann

Improving the assistant editor

  1. Set “Uses Focused Editor” in the Navigation preferences
  2. ⌘J to switch between panes or open new ones
  3. ⌘⇧O to open files in the currently focused pane

Source: Jesse Squires

The assistant editor is very useful for navigating around while remaining at your original position:

Spelling and Grammar

You can turn on spell checking in Xcode. Go to Edit > Format > Spelling and Grammar. This works on comments and identifiers, and is aware of capitalization conventions.

Source: Micheal Gorbach

Using behaviors to improve debugging

In Xcode’s preferences, go to the Behaviors tab. Navigate to the ‘Running’ section and click ‘Pauses’. Here you can instruct Xcode to open a new tab by checking the box for ‘Show tab named’ and giving it a name. By default, showing the ‘Debug Navigator’ should be enabled. Next, I like to show the debugger with the ‘Variables & Console View’, as well as hide the Utilities sidebar on the right.

Source: Jesse Squires