XCode IDE Guide

Back to Library

Xcode is the primary IDE used for almost all iOS development and understanding how to use it effectively is critical to being a productive developer.

Documentation

Tips and tricks

Useful keyboard shortcuts

Keyboard shortcut Action
command+control+ Toggle between .h/.m file
command+shift+O Open Quickly (fuzzy find)
command+shift+J Reveal in Project Navigator
command+/ Comment Selection

Plugins

Xcode has a primitive and unsupported (by Apple) plugin system. Nevertheless, developers have taken advantage of it and created a growing ecosystem of plugins that extend Xcode with useful features or fix annoying bugs.

Alcatraz

Alcatraz is an Xcode plugin manager, written as a plugin itself. Alcatraz adds a new menu item to Xcode and provides you with an interface for browsing and installing plugins created by others.

All Xcode plugins are open-source, and most developers submit them for inclusion in Alcatraz. Plugin developers are generally very open to contributions and will gladly accept changes to their plugin repositories, which then get propagated all Alcatraz users.

Some useful plugins:

Caveats

Because of their unsupported nature, plugin development isn’t very straightforward. Method swizzling and runtime introspection are commonly used. As such, proceed with caution. Plugins can be unstable and lead to Xcode crashes. However, I have a dozen or so installed and don’t experience any significant problems.

Plugins are loaded when Xcode launches and are required to have a valid DVTPlugInCompatibilityUUID. Each Xcode version will have a different UUID, so plugins may fail to load when updating Xcode. Developers tend to update their plugins regularly so this isn’t a problem. See this shell function for an immediate fix if the UUIDs aren’t added to the plugins upstream.

Snippets

Xcode has an often overlooked snippet manager. Snippets can be mapped to a completion shortcut. See the unofficial source of Xcode Snippets.


Allen

Back to Library