As always, this site contains notes to myself which others may (or may not) find useful. They may contain errors. Corrections and clarification is gratefully accepted. I apologize that these notes are somewhat abbreviated.
The instructions on the Adobe PhoneGap Build web site don’t properly display on all platforms. The core information is as follows.
Google uses the Java keytool program, which creates a database of cryptographic keys & certificates. If you have Java installed, keytool should be available. The example command is as follows:
$ keytool -genkey -v -keystore [keystorename].keystore -alias [aliasname] -keyalg RSA -keysize 2048 -validity 10000
iOS is more complicated. This requires access to an Apple machine running OS X.
The first step is to ensure that your Keychain Access program has the latest root certificate. As of this writing (16 June 2016) it is AddTrust External CA Root with an expiration date of 30 May 2020 at 4:48:38 a.m. (I solved this with a web search.)
Next, log into your developer.apple.com account. From the top menu, go to your Account. On the left-hand vertical bar, select Certificates, IDs & Profiles. Create an iOS certificate with the type iOS Distribution.
Download the certificate and load it into Keychain Access. (The certificate should have a submenu showing your private key. If it is not there, you can’t export it as a .p12 file.) Right click on the certificate and export it as a .p12 file.
To bypass the Apple gatekeepers for testing, you need to specify the unique device IDs (UDID) for every iOS device that the app is allowed to run on. Those are listed under Devices on the left-hand side.
Create a Provisioning File
If you want to bypass the Apple gatekeepers for testing, you need to create a new iOS provisioning file with the type Ad Hoc under the Distribution heading. This will allow to choose the certificate, application ID, and the UDIDs to enable for testing.
If you’re to the point where you want to submit your app through the Apple store, create a provisioning file with the type App Store under the Distribution heading. You will not be given the choice of selecting specific UDIDs this turn.
Lastly, log into the Adobe PhoneGap Build site and go to Edit Account. The second tab is Signing Keys. Under the appropriate OS, hit the add a key … button and upload your keystore (in the case of Android) or .p12 and provisioning files (in the case of iOS).
These keys should be ready to use for building your app.
To produce an iOS build using the PhoneGap Build web site, one must have created a signing certificate and provisioning list for the devices that the app is allowed to run on. These notes assume that this has been done, and there is a successful build on the PhoneGap Build web site.
The first step, and the first potential roadblock, is loading the app into iTunes.
This is where the first “gotcha” may turn up. The .ipa file does not have Apple’s blessing. By default OS X will refuse to load any un-blessed apps.
This can, however be changed in the Security preferences.
Use the lock symbol to allow for changes to the security settings, then choose “Anywhere” in the “Allow apps downloaded from:” section.
OS X will give a final warning about the dangers of doing this, and that the setting will revert to after a certain amount of time.
Now the app should show up in the list of apps to load onto the iOS device, and will be loaded when you sync the device.
Hydration is a wonderful development tool that will automatically fetch the latest version of the app from the PhoneGap Build web site. (It must be removed before submitting the app to Apple for review.) However, when one starts the app, it will sometimes hang.
To kill the hung app, the Apple support web site has an excellent tip.