How to make Build for iOS using Phonegap command line tools?

I want to create a Release Build for the iOS platform with a certificate of Distribution Certificate and Mobile provisioning profile . I want to do this using Phonegap (Cordova) command line tools , where I don't want to open Xcode .

I have a profile of distribution profiles and distribution. I also installed Xcode , NodeJS on my computer, but I don't want to open Xcode just to create an iOS build using the cordova command-line tools.

If possible, please help me.

+8
ios xcode cordova phonegap-build
source share
4 answers
cordova build ios --device --release 

you must have a build.json file in cordova. In build.json, the content should be like

  "ios": { "debug": { "codeSignIdentitiy": "iPhone Development", "provisioningProfile": "*****" }, "release": { "codeSignIdentitiy": "iPhone Distribution", "provisioningProfile": "******" } } 
+4
source share

I know this is an old thread, but I had the same problem and my answer could help more people.

In your cordova / phonegap project, you can write build.xcconfig for all your configuration needs. The file is here: <project-dir>/platforms/ios/cordova/build.xcconfig

When you run cordova build ios with the optional --release or --device , the cord will point to the file. This makes it easy to configure with minimal modification to the cord.

+1
source share

Just run

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

This platforms/<platform>/cordova contains the actual build of the script. You can take a look at it to find out how to build a cord.

UPD. To build the device (i.e., with the architecture of the hand, not for the i386 emulator), also pass the --device parameter.

0
source share

You have to go to build.phonegap.com and create an account with email and password there. After logging in, there are steps:

 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. 
-6
source share

All Articles