IPhone-command line compilation-xcodebuild

Source: Internet
Author: User

1. Check the xcode version and build version.

 
$ Xcodebuild-version

Display content:

 
Xcode 4.2
Build version 4d199

 

2. display the SDK and its version of the current system

 
$ Xcodebuild-showsdks

Display content:

 
Mac OS X sdks:
Mac OS X 10.6-SDK macosx10.6
Mac OS X 10.7-SDK macosx10.7

IOS sdks:
IOS 5.0-SDK iphoneos5.0

IOS simulator sdks:
Simulator-Ios 5.0-SDK iphonesimulator5.0

 

3. Display project information

First CD to the project directory (there is a directory of *. xcodeproj, such as makefiletest. xcodeproj), and then enter the command

 
$ Xcodebuild-list

Display content

Information about Project"Makefiletest":
Targets:
Makefiletest

Build deployments:
Debug
Release

IfNo build configuration is specified and-scheme is not passed then"Release"Is used.

Schemes:
Makefiletest

If not specified, the default value is release.

 

4. xcodebuild usage:

1) Use ios5.0 simulator (iphonesimulator5.0) to create a project

 
$ Xcodebuild-SDK iphonesimulator5.0

Output a bunch of compilation processes. The final output ** build succeeded ** indicates that the creation is successful;

If ** build failed ** is output, the creation fails.

The build directory is created under the current project directory. The structure is as follows:

Makefiletest. app is the executable file generated by compilation,

While the makefiletest. Build folder contains some intermediate files.

2) The default project is the release project. The debug mode should be set as follows:

 
$ Xcodebuild-SDK iphonesimulator5.0-configuration debug

3) projects created by clean

 
$ Xcodebuild clean-SDK iphonesimulator5.0-configuration debug

Output successfully**Clean succeeded**


5. xcodebuild compilation Parameters

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.