带有XCode的Phonegap 3.2.0

时间:2013-12-04 07:26:39

标签: cordova

我正在我的Mac上尝试Phonegap(最新版本3.2.0-0.16.0),我想使用XCode运行它(它也更新到最新版本)。但我似乎无法在XCode中打开我的项目。

我按照以下步骤和我得到的输出 -

SiddharthMacbook:phonegap-test siddharth$ phonegap create hello com.example.hello HelloWorld
[phonegap] created project at /Users/macbook/Desktop/phonegap-test/hello

cd hello

SiddharthMacbook:hello siddharth$ phonegap -V build ios
[phonegap] detecting iOS SDK environment...
[phonegap] Checking iOS requirements...

如您所见,iOS大楼未完成。平台文件夹中没有任何内容。

我还安装了cordova并执行了以下步骤 -

SiddharthMacbook:phonegap-test siddharth$ cordova create hello com.example.hello "HelloWorld"
Creating a new cordova project with name "HelloWorld" and id "com.example.hello" at location "/Users/macbook/Desktop/phonegap-test/hello"

cd hello

SiddharthMacbook:hello siddharth$ cordova platform add ios
Checking iOS requirements...
Creating ios project...
Preparing ios project

SiddharthMacbook:hello siddharth$ cordova prepare
Generating config.xml from defaults for platform "ios"
Preparing ios project

然后我尝试在XCode中打开项目,但它没有打开。我尝试完全打开hello文件夹。 XCode中没有任何事情发生,也没有打开。

我错过了什么吗?

我的XCode版本是5.0.2。

我今天只使用npm install命令安装了Phonegap和Cordova。

1 个答案:

答案 0 :(得分:0)

首次尝试添加平台时可能存在网络问题,并且缓存的副本可能处于不完整状态。

在您的主文件夹(〜)中有一个名为“.cordova”的子文件夹。 转到“〜/ .cordova / lib / ios / cordova”,删除3.2.0文件夹,然后再次尝试添加ios平台。首先删除你的“platforms / ios”文件夹(如果你有更改,请备份它)。

相关问题