What's this for?
If you want to make iOS apps using PhoneGap via the great build.phonegap.com service, you will need to add a signing key and then install the signed IPA file to your iOS device.
What you need
To do so, you basically need 3 things:
- A certificate with private key (*.p12)
- A provisioning profile (*.mobileprovision)
- The passphrase for the private key
So how to get all of these? This is a little guide to get you through the fun process of obtaining all of the above.
This guide assumes you're on OSX and have an iOS developer account.
Step 1: Get the certificate
Login into your Apple Developer Account and go to the iOS Provisioning Portal and then to the Certificates section
If you have a valid certificate already, you can download it now and skip to step 2. If not, create it as written below and then download it afterwards.
Step 1.1: Requesting a new certificate
Open the keychain on your computer.
From the menu you select "Certificate assitant" and choose "Request a certificate from a Certificate Authority (...)".
Enter your Apple-ID email adress and click on "Save to disk". Also check the checkbox below, saying something about setting the keys to use.
You should be prompted for a passphrase for your freshly made keys. Enter something and write it down somewhere.
Upload your Certificate Request file (you created above) and wait until the certificate is issued (may take a few minutes, refresh the site a few times).
If your certificate shows as issued, download it.
Step 2: The Provisioning profile
Now click on the "Provisioning" section.
You can either create a new provisioning profile or edit an existing one.
Make sure to have your certificate enabled in the profile you're going to use.
Download the desired provisioning profile.
Now you have a .mobileprovision file and a certificate (.cer) - there is still one missing: The certificate/key bundle (*.p12) - let's create it!
Step 3: Bundle the certificate and your key
Open the keychain tool on your computer.
Import the certificate by selecting "File" > "Import object" from the menu.
The certificate should now show up below the key you used to request the certificate.
Right-click on your key and select "Export".
Et voilá: There is your *.p12 file
Use it with build.phonegap.com
Add a new signing key and upload your *.mobileprovision and *.p12 file.
Enter the passphrase and you're ready to roll!
Install the application using iTunes
- Drag the *.mobileprovision file to iTunes.
- Drag the *.ipa file from build.phonegap.com to iTunes.
- Install it to your iOS device and sync.