iOS Xcode Build & Archive From Command Line

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Syntax

  • xcodebuild [-project name.xcodeproj] -scheme schemename [[-destination destinationspecifier] ...] [-destination-timeout value] [-configuration configurationname] [-sdk [sdkfullpath | sdkname]] [action ...] [buildsetting=value ...] [-userdefault=value ...]

Parameters

OptionDescription
-projectBuild the project name.xcodeproj.
-schemeRequired if building a workspace.
-destinationUse the destination device
-configurationUse the build configuration
-sdkspecified SDK

Remarks

Run xcodebuild from the directory containing your project to build an Xcode project. To build an Xcode workspace, you must pass both the -workspace and -scheme options to define the build. The parameters of the scheme will control which targets are built and how they are built, although you may pass other options to xcodebuild to override some parameters of the scheme.



Got any iOS Question?