ios - 如何在Ionic + iPhone的Terminal中运行项目?

标签 ios cordova ionic-framework cordova-plugins ionic

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/

相关文章:

ios - 使用CMDeviceMotion获取绝对旋转?

ios - 使用自定义图像作为 UINavigationController 导航栏的背景

ios - 新应用和应用更新必须使用 Xcode 6 或更高版本、OS X 和 iOS SDK 的公共(public) (GM) 版本构建

ios - Phonegap 1.5 (Cordova) ios childbrowser 根本打不开

javascript - javascript 中哪种存储和操作位域的方式最快? (200k+ 位)

javascript - Angular JS (Ionic) 数据数组到 $scope 元素

macos - 我无法通过 visual studio for Mac 安装教程的 remotebuild 部分

ios - Swift如何使导航中间部分图像和文本彼此相邻

html - Bootstrap 页脚旋转问题

angular - Ionicons 在 Ionic4 中返回 404