When running xcodebuild
from the command line. What does the install
option do?
xcodebuild -configuration release install
For the release
scheme in this example, what switches does install
flip?
The manual sadly does not elaborate and the man page for xcodebuild
makes no explicit reference to install
other than the command takes a <buildaction>
argument
xcodebuild
with the install
option "builds the target and installs it into the target's installation directory in the distribution root (DSTROOT
)."
(That quote is from here: https://keith.github.io/xcode-man-pages/xcodebuild.1.html#install which appears to be an older version of the xcodebuild
man page.)
The current documentation reference is: https://developer.apple.com/documentation/xcode/build-settings-reference#Installation-Build-Products-Location
mentions xcodebuild install
under DSTROOT:
Installation Build Products Location
Setting name:
DSTROOT
The path at which all products will be rooted when performing an install build. For instance, to install your products on the system proper, set this path to
/.
Defaults to/tmp/$(PROJECT_NAME).dst
to prevent a test install build from accidentally overwriting valid and needed data in the ultimate install path.Typically this path is not set per target, but is provided as an option on the command line when performing an
xcodebuild install
. It may also be set in a build configuration in special circumstances.