iOS Xcode Build & Archive From Command Line

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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?