In my build system, I am using xcodebuild
to build multiple projects.
I want to configure different Xcode installation to be used per project.
I know about sudo xcode-select --switch <path>
, but:
Is there a way to specify the build tools path to use per project?
From the output of xcrun
:
The active developer directory can be set using
xcode-select
, or via the DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual pages for more information.
E.g. to run xcodebuild with a specific Xcode-installation:
$ DEVELOPER_DIR=/path/to/my/Xcode.app/Contents/Developer xcodebuild
In a bash script:
export DEVELOPER_DIR=/path/to/my/Xcode.app/Contents/Developer
xcodebuild