Building xcode project from command line : A tutorial

November 10, 2009 at 10:37 pm Leave a comment

Recently, I had to integrate a xcode project into a build script such that the code compiles from command line and then installs into the required location. xcode doesn’t use Makefile to build the project. It has its own build system. However, it does have a way to build the project very easily from the command line.

Use the command xcodebuild to build a xcode project from command line. From the command line go to the directory where xcode project file resides and then execute this command. Various build options can be specified with this command. For example if you are building a framework and want to install it then the following command will work

% sudo xcodebuild install configuration release DSTROOT=/root/installation/path

The option INSTALL_PATH is the path from DSTROOT(Distribution Root). In our example above, after building the framework will be installed at /root/installation/path/Library/Frameworks

Also, if there are multiple targets then xcodebuild command will build the first target if no target is specified. For a complete list of options that can be used with xcodebuild use man xcodebuild


Entry filed under: Geeky stuff. Tags: .

Twitter – Something is technically wrong 5 characteristics of a successful freelancer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


  • RT @beeonaposy: Jumping back into code you wrote ages ago like 10% luck 20% skill 15% concentrated power of will 5% pleasure… 2 weeks ago
  • RT @jimmysong: Stuff CS departments should teach, but don't do very well: * Source control, esp. git * How to do effective code review * H… 1 month ago
  • RT @farbodsaraf: Advice to new managers: 1 earn trust by giving it 2 hire for EQ, train for IQ 3 eat lunch with your team 4 tell people t… 1 month ago


%d bloggers like this: