Description
A few issues have started to come in regarding the state of Cordova projects on Xcode 10. This is a rough summary of the situation:
Xcode 10 uses a new build system by default (previously available on an opt-in basis in Xcode 9). The cordova-ios project structure is not compatible with this new build system and results in failures.
Officially, we do not claim to support Xcode 10.
Currently the best workaround is to opt-out of the new build system:
-
If you're building on the command-line, you can specify
--buildFlag="-UseModernBuildSystem=0"
:# Cordova CLI cordova run ios --buildFlag='-UseModernBuildSystem=0' cordova build ios --buildFlag='-UseModernBuildSystem=0' # Ionic CLI ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0" ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
-
If you're building with a build.json config file, you can add the following under the iOS release or debug config:
"buildFlag": [ "-UseModernBuildSystem=0" ]
-
If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"
We're going to investigate what's required to make cordova-ios compatible with the new build system, and hope to include that in the next major version (cordova-ios@5.0.0).
Activity
sambegin commentedon Sep 17, 2018
Just note here that the build.json file should look like this :
not
like "mentioned" in the previous comment ;p
SuperStar518 commentedon Sep 18, 2018
Thanks, @dpogue
I was really wondering about the workaround. Hope to fix it soon!
Cheers
neofuture commentedon Sep 18, 2018
is this why im getting this issue
ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."
is there a workaround ?
aceoliver commentedon Sep 18, 2018
@neofuture I am also encountering this after upgrading to XCode 10
janpio commentedon Sep 18, 2018
Then open an issue please that has all available information on these failures @neofuture and @aceoliver. Thanks.
DRneilC commentedon Sep 19, 2018
@dpogue Thanks! The answer solved my problem.
Birowsky commentedon Sep 19, 2018
tanvishah-syn commentedon Sep 19, 2018
@sambegin Thanks for the workaround. Where is this build.json file is present in the app directory structure?
jeffreyramia commentedon Sep 19, 2018
Btw this worked for me:
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
tanvishah-syn commentedon Sep 19, 2018
@jeffreyramia with the help of your answer I am able to build an app but whenever I am trying to emulate it gives me an error as "platforms/ios/build/emulator/demo APP.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova."
PeterStegnar commentedon Sep 19, 2018
If you use pure cordova ios, you can run like:
cordova run --target='iPad-Air-2' --buildFlag='-UseModernBuildSystem=0'
199 remaining items
erisu commentedon Feb 8, 2019
It is still currently in the middle of the release process. It is recommended to wait until it is released on NPM.
Baadier-Sydow commentedon Feb 8, 2019
@erisu My apologies. I assumed once it was tagged here we were good to go.
xtianus79 commentedon Feb 8, 2019
@dpogue you sir won the internet today!!!
rolinger commentedon Feb 8, 2019
Not to tick anyone off or insult anyone or the effort into making 5.0.0 happen, but how tested is the latest release - or can we all ignore my inquiry and just thank Apple for forcing us into bleeding edge?
For the record....its stuff like this...and a gazillion other things about Apple that tick me off. Nothing but a bunch of rotten Apples.
erisu commentedon Feb 9, 2019
cordova-ios@5.0.0
is now officially released to NPM.Here is also the Cordova iOS 5.0.0 Release Blog Post.
fgilio commentedon Feb 9, 2019
Thanks to everyone involved!
kkjhamb01 commentedon Feb 9, 2019
Good to hear. Thanks. It is really appreciated for your hard work.
l3ender commentedon Feb 9, 2019
I'm slightly confused about the release. Does it mean if I update to 5.0.0, using
UseModernBuildSystem=0
is no longer required?Thanks!
dpogue commentedon Feb 9, 2019
That's correct
giladrom commentedon Feb 10, 2019
@dpogue It seems as though setting UseModernBuildSystem=1 is still behaving like it used to, even after upgrading to 5.0.0. Can you show a sample output of a build process using the new build system?
kkjhamb01 commentedon Feb 11, 2019
After adding cordova-ios@5.0.0, can't add onesingal plugin.
It shows this issue:
dpogue commentedon Feb 11, 2019
Firstly,
[!] You cannot run CocoaPods as root.
Secondly, Cocoapod support was refactored in cordova-ios 5.0.0, which is one of the reasons it's a major version bump. Some plugins might not (yet) be compatible with it.
I'm going to lock discussion on this issue, since it is closed. Please open new issues for problems that you find with cordova-ios@5.0.0.