如何从phonegap启动ios模拟器 [英] how to launch ios simulator from phonegap

查看:110
本文介绍了如何从phonegap启动ios模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从命令行启动ios模拟器使用
$ phonegap运行ios
i得到以下错误


错误:找不到ios-sim。请从
下载,构建和安装
版本1.5或更高版本 https://github.com/phonegap/ios -sim 进入你的路径。或使用homebrewbrew install
ios-sim: http://mxcl.github.com/homebrew/


我甚至试图将上述ios-sim文件夹复制到我的路径。仍然收到错误。

解决方案

最佳解决方案


  1. 确保您已安装 XCode 及其命令行工具并接受许可协议


  2. 在终端中执行以下命令,下载并安装Homebrew:


    ruby​​ -e$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install



  3. 通过Homebrew安装ios-sim:


    brew install ios-sim



  4. 查看错误讯息或安装成功后,您应该可以运行iOS模拟器:


    phonegap运行ios


    < blockquote>






替代解决方案



您可以尝试通过npm安装ios-sim:




  • a href =http://nodejs.org/> http://nodejs.org/ 并安装node.js (npm将自动安装为节点的程序包管理器)。

  • 通过执行

    通过npm安装ios-sim。


    sudo npm install ios-sim -g


  • 如果您在Windows计算机上,请以管理员身份打开命令提示符,然后执行 npm install ios-sim 而不是



when i try to launch ios simulator from command line by using $ phonegap run ios i get the below error

Error: ios-sim was not found. Please download, build and install version 1.5 or greater from https://github.com/phonegap/ios-sim into your path. Or 'brew install ios-sim' using homebrew: http://mxcl.github.com/homebrew/

i even tried copying the above ios-sim folder into my path. still getting an error.

解决方案

Best Solution:

  1. Make sure you have XCode and its command line tools installed and accepted the license agreements

  2. Download and install Homebrew by executing following command in terminal:

    ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

  3. Install ios-sim via Homebrew by executing:

    brew install ios-sim

  4. Watch for error messages or upon successfull installation, you should be able to run the iOS Simulator:

    phonegap run ios


Alternative Solution:

You could try installing ios-sim via npm:

  • Head over to http://nodejs.org/ and install node.js (npm will be automatically installed as node's package manager).
  • Install ios-sim via npm by executing

    sudo npm install ios-sim -g

  • if you're on a Windows machine, open the command prompt as administrator and execute npm install ios-sim instead

这篇关于如何从phonegap启动ios模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆