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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


  • RT @sriramk: Legit question on iPhone X - how do you do the bedside no-look fumble/TouchId/turn off alarm clock bit? 1 week ago
  • RT @venkat_s: While everyone is so excited about eclipse, please remember there are other fine IDEs and text editors. 1 month ago
  • RT @dcurtis: “People ask me what my definition of success is, and for me it's where you're truly okay with losing everything you have." —… 1 month ago


%d bloggers like this: