There is an (as of yet undocumented) flag in xcodebuild
: -UseModernBuildSystem=<value>
. The value can be either 0
or NO
to use the legacy (“original”) build system, or 1
or YES
to use the new build system.
For example:
xcodebuild -workspace Foo.xcworkspace -scheme Bar -configuration Release -archivePath /path/to/Foo.xcarchive clean archive -UseModernBuildSystem=NO
(-UseNewBuildSystem=<value>
seems to work as well; this flags was introduced in Xcode 9 but I suspect UseModernBuildSystem
is going to be the “official” flag for this.)