Reputation: 3748
I'm going through the beginner series for a Cordova application. I installed XCode and created a new Cordova project. That being said, when I run cordova emulate ios
, I get the following error:
No target specified for emulator. Deploying to iPhone-X, 12.1 simulator
/Users/osx/Code/cordova-poc/platforms/ios/build/emulator/HelloCordova.app/Info.plist file not found.
If I run cordova build ios
and run the code in XCode, then I can see that Xcode opens up the emulator where I can see my changes. This is, obviously, too slow.
Upvotes: 0
Views: 1703
Reputation: 103
As stated
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. Source
1 CLI WORKAROUND
# 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"
2 CONFIG FILE WORKAROUND
"buildFlag": [
"-UseModernBuildSystem=0"
]
In your build.json config file.
3 XCODE WORKAROUND Thanks to @kitolog for the screens.
Upvotes: 4
Reputation: 4218
I suspect that you're running XCode 10. XCode 10 has a new build system which is not yet supported by Cordova.
You should be able to work around this by running the following:
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
More information in this issue here: https://github.com/apache/cordova-ios/issues/407
Upvotes: 2