Phonegap 3:phonegap install ios - 错误:没有平台添加到此项目中

Ser*_*kyy 2 ios ios-simulator cordova

我创建了一个新的phonegap 3项目

phonegap创建我的应用程序

cd my-app

然后我试图安装到ios

phonegap安装ios

[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] trying to install app onto device
[phonegap] no device was found
[phonegap] trying to install app onto emulator
 [warning] missing ios-sim
 [warning] install ios-sim from http://github.com/phonegap/ios-sim
   [error] No platforms added to this project. Please use `cordova platform add <platform>`.
Run Code Online (Sandbox Code Playgroud)

Ser*_*kyy 5

1)从警告中可以看出,您需要安装ios-sim.

按照github.com/phonegap/ios-sim上的说明进行操作

Brew安装对我不起作用,所以我从源根目录中构建并安装了ios-sim

git clone git://github.com/phonegap/ios-sim.git
cd ios-sim
rake install prefix=/usr/local/
Run Code Online (Sandbox Code Playgroud)

2)在安装之前,您需要为专用平台构建项目.

首先

phonegap build ios
Run Code Online (Sandbox Code Playgroud)

其次

phonegap install ios
Run Code Online (Sandbox Code Playgroud)