2

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

phonegap 创建我的应用程序

cd 我的应用程序

然后我试图安装到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>`.
4

1 回答 1

5

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

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

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

git clone git://github.com/phonegap/ios-sim.git
cd ios-sim
rake install prefix=/usr/local/

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

首先

phonegap build ios

第二

phonegap install ios
于 2013-09-27T07:47:02.340 回答