I'd like to use the new build system of Xcode 10 for development, but our build in our continuous integration system fails since the xcarchive
produced has an issue: the Info.plist
in the xcarchive
is missing the ApplicationProperties
key and the information therein!
It turns out switching back to the legacy build system fixes this. This can be done in the workspace settings (File > Workspace Settings… > Build System). But I would prefer to keep the new build system for development and only use the legacy build system for CI builds.
Is there a way to make xcodebuild
use the legacy build system without modifying the workspace?
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.)
Change build system to Legacy Build System
from New Build System
and vice versa.
Open Xcode --> Select File -->Select Workspace Settings
Change Build System to Legacy Build System from New Build System --> Click Done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With