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/

相关文章:

javascript - 如何防止向左/向右滑动时垂直滚动

javascript - Twitter登录cordova android应用程序

node.js - 无法安装 ionic 框架

ios - 保留应用程序名称 ios

ios - countDownTimer = 0 的 UIDatePicker 显示 "0 hours 1 min"

iphone - 如何在 Xcode 4.5 中将内容连接到不同页面。 iOS 6

jquery - 使用带有 HTML5 和 jquery 的 phonegap 1.3.0 创建 android 应用程序时无限弹出错误?

ios - 状态栏是横向的,但是 [[UIApplication sharedApplication] statusBarOrientation] 返回纵向

android - 使用 Cordova 插件的 Google Cloud Messaging IOS 注册

node.js - ionic Cordova 构建类型 'ModuleWithProviders' 不是通用的