在phonegap中为ios构建应用程序时出错(因为android工作正常)

时间:2014-07-02 15:43:59

标签: ios cordova build

我正在开发一个带有phonegap的应用程序,我一直在使用Android模拟器测试应用程序,我没有遇到任何问题,但我无法让它适用于iOS。

我正在研究Mac OS mavericks并安装了Xcode。

当我运行命令“phonegap run ios”时,我得到以下内容:

[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/usuario/Desktop/desarrolloapp/nombreapp/platforms/ios/build/emulator
SDKROOT = iphonesimulator7.1
VALID_ARCHS = i386

xcodebuild: error: The project ‘NombreApp.xcodeproj’ does not contain a target named ‘NombreApp’.
[error] /Users/usuario/Desktop/desarrolloapp/nombreapp/platforms/ios/cordova/build: Command failed with exit code 65

关于发生了什么的任何想法?

编辑:我解决了这个问题:

  1. 从平台中删除ios文件夹。
  2. 再次运行(phonegap run ios)。
  3. 使用命令sudo npm install -g ios-sim。
  4. 安装ios-sim
  5. 一切正常!
  6. 非常感谢。

    祝你好运。

1 个答案:

答案 0 :(得分:0)

在Xcode中手动创建名为 NombreApp 的目标,如下链接:

- > How to create or define a new target in a custom Xcode project template

此致