无法使用Cordova模拟ios [英] Not able to emulate ios with Cordova
问题描述
我正在研究Cordova应用程序的初学者系列.我安装了XCode并创建了一个新的Cordova项目.就是说,当我运行cordova emulate ios
时,出现以下错误:
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.
如果我运行cordova build ios
并在XCode中运行代码,那么我可以看到Xcode打开了模拟器,在其中可以看到所做的更改.显然,这太慢了.
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.
推荐答案
我怀疑您正在运行XCode10.XCode10具有一个Cordova尚不支持的新构建系统.
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"
此处有关此问题的更多信息: https://github.com/apache/cordova-ios/issues/407
More information in this issue here: https://github.com/apache/cordova-ios/issues/407
这篇关于无法使用Cordova模拟ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!