MacBook-Pro:myApps naveenkumar$ ionic run ios
Adding in default Ionic hooks
Running command: /Users/naveenkumar/Documents/ionic_work/myApps/hooks/after_prepare/010_add_platform_class.js /Users/naveenkumar/Documents/ionic_work/myApps
add to body class: platform-ios
Running command: /Users/naveenkumar/Documents/ionic_work/myApps/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/naveenkumar/Documents/ionic_work/myApps
Running command: /Users/naveenkumar/Documents/ionic_work/myApps/platforms/ios/cordova/run
Cordova needs ios-sim version 3.0.0 or greater, you have version 1.9.0
.
ERROR running one or more of the platforms: Error: /Users/naveenkumar/Documents/ionic_work/myApps/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
MacBook-Pro:myApps naveenkumar$
你好,
我正在尝试从终端运行我的项目。我收到上述错误。但是,当我转到给定的iOS目录时,从 Xcode 运行我的项目,它可以正常工作。这意味着,当我从Xcode运行时,我可以运行模拟器/ simulator并检查我的输出。但是,当我从终端运行时,我无法运行我的应用程序。您能否告诉我如何从终端运行我的应用程序?
谢谢
最佳答案
这是问题:Cordova needs ios-sim version 3.0.0 or greater, you have version 1.9.0
解决方法如下:npm update -g ios-sim
关于ios - 如何在Ionic + iPhone的Terminal中运行项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29291346/