iDev: Build and Run an xcode project via terminal (Command Line Tool)

Hello Friends,

Today I post a very simple but important technique to build the application using terminal.

How to build and create .app file from out side Xcode i.e. with/using terminal.

Procedure  :

1-> Open Terminal (Go to Spotlight and search terminal)

2-> Go to specified project folder using cd command , Suppose you create a iPhone application project , project named : SampleApp , which is located in your Desktop.

So you can write in the terminal like this :

MacMini: Admin$ cd Desktop\SampleApp

3-> After than you can write this command on the terminal

xcodebuild -target ‘AppName.xcodeproj’ -scheme ‘AppName’ -configuration “Debug/Release” -sdk iphoneos6.0/5.0/4.0 -arch “armv7 armv7s” CONFIGURATION_BUILD_DIR=’BuildDirectoryName‘ ONLY_ACTIVE_ARCH=NO/YES

For our SampleApp example you can write on the terminal as:

MacMini:SampleApp Admin$ xcodebuild -target ‘SampleApp.xcodeproj’ -scheme ‘SampleApp‘ -configuration “Debug” -sdk iphoneos6.0 -arch “armv7 armv7s” CONFIGURATION_BUILD_DIR=’TestBuild‘ ONLY_ACTIVE_ARCH=NO

4-> After that your build folder is created and .app file will be there in TestBuild Folder. Path : Desktop/SampleApp/TestBuild/

For Further references you can read here:

Thanks 🙂 Keep Coding 🙂




One thought on “iDev: Build and Run an xcode project via terminal (Command Line Tool)

Leave a Reply

Please log in using one of these methods to post your comment: 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