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 either0
orNO
to use the legacy ("original") build system, or1
orYES
to use the new build system.For example:
(
-UseNewBuildSystem=<value>
seems to work as well; this flags was introduced in Xcode 9 but I suspectUseModernBuildSystem
is going to be the "official" flag for this.)To select Xcode 10's build system:
In Xcode, go to: File -> Project Settings (or Workspace Settings)-> Build System
From there you can select
New Build System (Default)
orLegacy Build System
Hope this help makes this easier.
To extend DarkDust's answer, in case you're using fastlane for automated builds, additional parameters such as
UseModernBuildSystem
can be passed throughxcargs
: