8

我想使用Distribution Certificate & Mobile Provisioning ProfileiOS 平台制作Release Build。我想在不想打开XCode的地方使用Phonegap(Cordova) 命令行工具来执行此操作。

我有移动配置文件和分发证书。我还在我的机器上安装了XCodeNodeJS,但我不想打开 Xcode 只使用 cordova 命令行工具生成 iOS 版本。

如果可能的话,请帮助我。

4

4 回答 4

4
cordova build ios --device --release

你应该在科尔多瓦有一个名为 build.json 的文件。在 build.json 中,内容应该是这样的

  "ios": {
    "debug": {
       "codeSignIdentitiy": "iPhone Development",
       "provisioningProfile": "*****"
    },
   "release": {
     "codeSignIdentitiy": "iPhone Distribution",
     "provisioningProfile": "******"
   }
 }
于 2015-11-25T05:52:32.283 回答
1

我知道这是一个旧线程,但我遇到了同样的问题,我的回答可能会帮助更多人。

在您的 cordova/phonegap 项目中,您可以写入 build.xcconfig 以满足您的所有配置需求。该文件位于此处: <project-dir>/platforms/ios/cordova/build.xcconfig

当您cordova build ios使用可选的--releaseor运行时--device,cordova 将指向该文件。这允许通过对cordova的最小修改进行简单的配置。

于 2014-08-25T03:56:16.433 回答
0

赶紧跑

<project_dir>/platforms/ios/cordova/build.sh --release

platforms/<platform>/cordova目录包含实际的构建脚本。您可以查看它以了解 cordova 是如何构建的。

UPD。 为了使设备构建(即使用 arm 架构,不适用于 i386 仿真器)--device也传递参数。

于 2014-08-20T19:17:23.787 回答
-6

你应该去 build.phonegap.com 并在那里创建一个带有电子邮件和密码的帐户。登录后,有以下步骤:

1. Upload a zip of your project.
2. Start building it for first time.
3. Go on account (top left user icon) -> edit settings
4. Go to on Signing keys and add a new key by uploading the p12 and provisioning files
5. Unlock it using the password of the certificate.
6. Go on apps menu, you should have the app.
7. Press on app title in order to expand the builds
9. Select the key for IOS.

After that start a cmd window, make sure you have all requirements met (as is described here:http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html).
In that cmd window, you should perform following commands:
phonegap remote login -u <the account email> -p <the password>
phonegap remote build ios


In order to be all ok, you should be sure to have in config.json file the id of this new account.
Also, in order to perform the previous phonegap commands, you need to be in the folder of the project.

Please, be aware, the activation of the ios key is around 1 hour. If you want to do this automatically, you should first login, unlock the key, and build.
于 2014-07-16T02:25:38.310 回答