xcodebuild

Build Xcode projects

Options

NameDescription
-usagePrint brief usage
-helpPrint complete usage
-verboseProvide additional status output
-licenseShow the Xcode and SDK license agreements
-checkFirstLaunchStatusCheck if any First Launch tasks need to be performed
-runFirstLaunchInstall packages and agree to the license
-project <NAME>Build the project NAME
-target <NAME>Build the target NAME
-alltargetsBuild all targets
-workspace <NAME>Build the workspace NAME
-scheme <NAME>Build the scheme NAME
-configuration <NAME>Use the build configuration NAME for building each target
-xcconfig <NAME>Apply the build settings defined in the file at PATH as overrides
-arch <ARCH>Build each target for the architecture ARCH; this will override architectures defined in the project
-sdk <SDK>Use SDK as the name or path of the base SDK when building the project
-toolchain <NAME>Use the toolchain with identifier or name NAME
-destination <DESTINATION SPECIFIER>Use the destination described by DESTINATIONSPECIFIER (a comma-separated set of key=value pairs describing the destination to use)
-destination-timeout <TIMEOUT>Wait for TIMEOUT seconds while searching for the destination device
-parallelizeTargetsBuild independent targets in parallel
-jobs <NUMBER>Specify the maximum number of concurrent build operations
-maximum-concurrent-test-device-destinations <NUMBER>The maximum number of device destinations to test on concurrently
-maximum-concurrent-test-simulator-destinations <NUMBER>The maximum number of simulator destinations to test on concurrently
-parallel-testing-enabled <mode>Overrides the per-target setting in the scheme
-parallel-testing-worker-count <NUMBER>The exact number of test runners that will be spawned during parallel testing
-maximum-parallel-testing-workers <NUMBER>The maximum number of test runners that will be spawned during parallel testing
-dry-runDo everything except actually running the commands
-quietDo not print any output except for warnings and errors
-hideShellScriptEnvironmentDon't show shell script environment variables in build log
-showsdksDisplay a compact list of the installed SDKs
-showdestinationsDisplay a list of destinations
-showTestPlansDisplay a list of test plans
-showBuildSettingsDisplay a list of build settings and values
-showBuildSettingsForIndexDisplay build settings for the index service
-listLists the targets and configurations in a project, or the schemes in a workspace
-find-executable <NAME>Display the full path to executable NAME in the provided SDK and toolchain
-find-library <NAME>Display the full path to library NAME in the provided SDK and toolchain
-versionDisplay the version of Xcode; with -sdk will display info about one or all installed SDKs
-enableAddressSanitizer <mode>Turn the address sanitizer on or off
-enableThreadSanitizer <mode>Turn the thread sanitizer on or off
-enableUndefinedBehaviorSanitizer <mode>Turn the undefined behavior sanitizer on or off
-resultBundlePath <PATH>Specifies the directory where a result bundle describing what occurred will be placed
-resultStreamPath <PATH>Specifies the file where a result stream will be written to (the file must already exist)
-resultBundleVersion <version>Specifies which result bundle version should be used
-clonedSourcePackagesDirPath <PATH>Specifies the directory to which remote source packages are fetch or expected to be found
-derivedDataPath <PATH>Specifies the directory where build products and other derived data will go
-archivePath <PATH>Specifies the directory where any created archives will be placed, or the archive that should be exported
-exportArchiveSpecifies that an archive should be exported
-exportNotarizedAppExport an archive that has been notarized by Apple
-exportOptionsPlist <PATH>Specifies a path to a plist file that configures archive exporting
-enableCodeCoverage <mode>Turn code coverage on or off when testing
-exportPath <PATH>Specifies the destination for the product exported from an archive
-skipUnavailableActionsSpecifies that scheme actions that cannot be performed should be skipped instead of causing a failure
-exportLocalizationsExports completed and outstanding project localizations
-importLocalizationsImports localizations for a project, assuming any necessary localized resources have been created in Xcode
-localizationPath <PATH>Specifies a path to XLIFF localization file
-exportLanguage <languages...>Specifies multiple optional ISO 639-1 languages included in a localization export
-xcroot <path>Specifies a path to a .xcroot to use for building and/or testing
-xctestrun <path>Specifies a path to a test run specification
-testPlan <test plan>Specifies the name of the test plan associated with the scheme to use for testing
-only-testingConstrains testing by specifying tests to include, and excluding other tests
-only-testing: <Test Identifier>Constrains testing by specifying tests to include, and excluding other tests
-skip-testingConstrains testing by specifying tests to exclude, but including other tests
-skip-testing: <Test Identifier>Constrains testing by specifying tests to exclude, but including other tests
-test-timeouts-enabled <mode>Enable or disable test timeout behavior
-default-test-execution-time-allowance <SECONDS>The default execution time an individual test is given to execute, if test timeouts are enabled
-maximum-test-execution-time-allowance <SECONDS>The maximum execution time an individual test is given to execute, regardless of the test's preferred allowance
-only-test-configurationConstrains testing by specifying test configurations to include, and excluding other test configurations
-skip-test-configurationConstrains testing by specifying test configurations to exclude, but including other test configurations
-testLanguageConstrains testing by specifying ISO 639-1 language in which to run the tests
-testRegionConstrains testing by specifying ISO 3166-1 region in which to run the tests
-resolvePackageDependenciesResolves any Swift package dependencies referenced by the project or workspace
-disableAutomaticPackageResolutionPrevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file
-jsonOutput as JSON
-allowProvisioningUpdatesAllow xcodebuild to communicate with the Apple Developer website. For automatically signed targets, xcodebuild will create and update profiles, app IDs, and certificates. For manually signed targets, xcodebuild will download missing or updated provisioning profiles. Requires a developer account to have been added in Xcode's Accounts preference pane
-allowProvisioningDeviceRegistrationAllow xcodebuild to register your destination device on the developer portal if necessary. This flag only takes effect if -allowProvisioningUpdates is also passed
-scmProvider <Implementation>Which implementation to use for Git operations (system/xcode)
-showBuildTimingSummaryDisplay a report of the timings of all the commands invoked during the build
-create-xcframeworkCreate an xcframework from prebuilt libraries; -help for more information
buildBuild the target in the build root (SYMROOT). This is the default build action
installsrcCopy the source of the project to the source root (SRCROOT)
installBuild the target and install it into the target's installation directory in the distribution root (DSTROOT)
cleanRemove build products and intermediate files from the build root (SYMROOT)