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.
Enter: liftoff.
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
- Add some sensible patterns to the project
.gitignore
file - Set the project indentation settings to 4 spaces
- Set Hosey-level warnings 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
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. We hope you enjoy it as much as we do.