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 Configurations:
Debug
Release

If no 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 ** clean succeeded **

 

5. xcodebuild compilation Parameters

IPhone-command line compilation-xcodebuild

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.