Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Latest commit

 

History

History
executable file
·
100 lines (63 loc) · 4.2 KB

2-ios.html.md

File metadata and controls

executable file
·
100 lines (63 loc) · 4.2 KB
title url layout tabs
iOS Signing
phonegap-build/signing/ios
subpage
label url
Overview
phonegap-build/signing/overview
label url
iOS
phonegap-build/signing/ios
label url
Android
phonegap-build/signing/android
label url
Windows
phonegap-build/signing/windows

A Certificate and Mobile Provisioning file are required to build your iOS apps on PhoneGap Build, and in order to obtain these, a membership in the Apple Developer Program is required. During development, you will use a Development certificate which will allow you to install your iOS apps on a pre-selected set of specific devices (identified by their UUID). Once you're ready to publish, you'll sign the application with a Distribution certificate.


Mac Users

Generating your p12 certificate

You'll first need to obtain an Apple Developer Certificate. See apple documentation for this.

Next you'll export it to the P12 keystore format. To do this on Mac® OS:

  1. Open the Keychain Access application (in the Applications/Utilities folder).
  2. If you have not already added the certificate to Keychain, select File > Import. Then navigate to the certificate file (the .cer file) you obtained from Apple.
  3. Select the Keys category in Keychain Access.
  4. Select the private key associated with your iPhone Development Certificate. The private key is identified by the iPhone Developer: public certificate that is paired with it.
  5. Command-click the iPhone Developer certificate and select, Export "iPhone Developer: Name...".

Keychain export

  1. Save your keystore in the Personal Information Exchange (.p12) file format.
  2. You will be prompted to create a password that is used when you use the keystore to sign applications or transfer the key and certificate in this keystore to another keystore.

keychain password


Windows Users

Convert an Apple developer certificate to a P12 file on Windows

To develop apps via Build, you must use a P12 certificate file. You generate this certificate based on the Apple iPhone developer certificate file you receive from Apple.

  1. Download and install OpenSSL

  2. Convert the developer certificate file you receive from Apple into a PEM certificate file. To do this, run the following command-line statement from the OpenSSL bin directory:

openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM

  1. If you are using the private key from the keychain on a Mac computer, convert it into a PEM key:

openssl pkcs12 -nocerts -in mykey.p12 -out mykey.pem

  1. You can now generate a valid P12 file, based on the key and the PEM version of the iPhone developer certificate:

openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12

Register devices

  1. Visit Apple Developer Portal.
  2. Go to Device section. Under Manage tab, provide Device Name and Device UDID (40 hex characters).

Create Provisioning Profile

  1. Visit Apple Developer Portal.
  2. Go to Provisioning section. Create new profile under Development tab.
  3. Fill the form with Profile Name, Certificates (as per .cer above), App ID and your development device.

Submit to Build

Go to your Account > Edit Setting > Signing Keys' tab:

Edit Account

Click 'add a key...' and supply your previously generated p12:

Add Key

Unlocking the key.

Go to your Account > Edit Setting > Signing Keys' tab:

Edit Account

Click 'lock' button and supply the certificate password you used to export your cert.

Unlock key