October 3rd, 2018

Compiling Ionic iOS apps on macOS Mojave/XCode 10


Suddenly having issues compiling iOS apps after updating to macOS Mojave/Xcode 10? Don’t worry, here’s the solution. Just add the following flag when building:

Terminal
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

If you want to emulate/run with --livereload, include it before the --buildFlag

Terminal
ionic cordova run ios --livereload -- --buildFlag="-UseModernBuildSystem=0"

What's going on?

XCode 10 introduces a new build system, which cordova-ios 4.5.5 doesn't support yet. This should be fixed in version 5, but until then, you'll have to manually specify the old build system.

More info found at https://github.com/apache/cordova-ios/issues/407