我创建了一个新的phonegap 3项目
phonegap创建我的应用
cd my-app
然后我试图安装到ios
phonegap install 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>`.
答案 0 :(得分:5)
1)从警告中可以看出,您需要安装ios-sim。
中的说明操作Brew安装对我不起作用,所以我从源根构建并安装了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