---
title: Opinionated Settings for App Development in Xcode
teaser:
tags: ios
author: Gordon Fontenot
published_on: 2013-01-18
---

Setting up a new Xcode project is as simple as ⇧⌘N. _Unless_ you want to do
things the right way, at which point there are a number of other configurations
you need to worry about: `.gitignore`, `.gitattributes`, project level
indentation settings, warning levels, etc. After doing the same setup procedure
a few times, you can make it a relatively quick process. But it's 2013, and
we're living in the future now. We have the technology to build [tacocopters],
but I still have to set my error levels manually? That's just ridiculous.

[tacocopters]: http://tacocopter.com

Enter: [liftoff].

[liftoff]: http://www.github.com/thoughtbot/liftoff

![liftoff-image](http://media.tumblr.com/b8f7f6048fa3075fd86a460e08bc72c0/tumblr_inline_mgu3tuNKn81qatszo.jpg)

liftoff is a small Ruby gem that we've been working on to make new Xcode project
setup as fast and painless as possible. With one simple command, you'll have a
slew of defaults set up for your project, along with some things that we think
will make your life in Xcode a bit nicer.

## Usage

First, install the gem, which is as simple as `gem install liftoff`. Then, while
in your project directory (wherever you are keeping the `.xcodeproj` file), just
run `liftoff`. This will set up the project defaults we like to use:

* Add the [`.pbxproj` `.gitattributes`][gitattributes]
* Add some sensible patterns to the project `.gitignore` file
* Set the project indentation settings to 4 spaces
* Set [Hosey-level warnings][hosey] at the project level
* Turn on Static Analysis at the project level
* Treat warnings as errors for release builds
* Add a Run Script build phase to [treat TODO and FIXME comments as warnings][todo-fixme]

[gitattributes]: https://thoughtbot.com/blog/post/33796217972/xcode-and-git-bridging-the-gap
[todo-fixme]: http://deallocatedobjects.com/posts/show-todos-and-fixmes-as-warnings-in-xcode-4
[hosey]: http://boredzo.org/blog/archives/2009-11-07/warnings

These commands can be run individually as well. For example, setting the
project's indentation level to 2 spaces can be done with `liftoff indentation
2`.

The best part about using liftoff over another solution like a custom project
template is that liftoff can be used to quickly add these settings to an
existing project without worrying about stomping on your current setup.

liftoff is currently at version 0.6 and, as usual, the code is open source [on
GitHub][liftoff]. We hope you enjoy it as much as we do.
