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 <command>Build the project NAME
-target <command>Build the target NAME
-alltargetsBuild all targets
-workspace <command>Build the workspace NAME
-scheme <command>Build the scheme NAME
-configuration <command>Use the build configuration NAME for building each target
-xcconfig <command>Apply the build settings defined in the file at PATH as overrides
-arch <command>Build each target for the architecture ARCH; this will override architectures defined in the project
-sdk <command>Use SDK as the name or path of the base SDK when building the project
-toolchain <command>Use the toolchain with identifier or name NAME
-destination <command>Use the destination described by DESTINATIONSPECIFIER (a comma-separated set of key=value pairs describing the destination to use)
-destination-timeout <command>Wait for TIMEOUT seconds while searching for the destination device
-parallelizeTargetsBuild independent targets in parallel
-jobs <command>Specify the maximum number of concurrent build operations
-maximum-concurrent-test-device-destinations <command>The maximum number of device destinations to test on concurrently
-maximum-concurrent-test-simulator-destinations <command>The maximum number of simulator destinations to test on concurrently
-parallel-testing-enabled <command>Overrides the per-target setting in the scheme
-parallel-testing-worker-count <command>The exact number of test runners that will be spawned during parallel testing
-maximum-parallel-testing-workers <command>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 <command>Display the full path to executable NAME in the provided SDK and toolchain
-find-library <command>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 <command>Turn the address sanitizer on or off
-enableThreadSanitizer <command>Turn the thread sanitizer on or off
-enableUndefinedBehaviorSanitizer <command>Turn the undefined behavior sanitizer on or off
-resultBundlePath <command>Specifies the directory where a result bundle describing what occurred will be placed
-resultStreamPath <command>Specifies the file where a result stream will be written to (the file must already exist)
-resultBundleVersion <command>Specifies which result bundle version should be used
-clonedSourcePackagesDirPath <command>Specifies the directory to which remote source packages are fetch or expected to be found
-derivedDataPath <command>Specifies the directory where build products and other derived data will go
-archivePath <command>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 <command>Specifies a path to a plist file that configures archive exporting
-enableCodeCoverage <command>Turn code coverage on or off when testing
-exportPath <command>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 <command>Specifies a path to XLIFF localization file
-exportLanguage <command...>Specifies multiple optional ISO 639-1 languages included in a localization export
-xcroot <command>Specifies a path to a .xcroot to use for building and/or testing
-xctestrun <command>Specifies a path to a test run specification
-testPlan <command>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: <command>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: <command>Constrains testing by specifying tests to exclude, but including other tests
-test-timeouts-enabled <command>Enable or disable test timeout behavior
-default-test-execution-time-allowance <command>The default execution time an individual test is given to execute, if test timeouts are enabled
-maximum-test-execution-time-allowance <command>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 <command>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)