IOS Certificates

iOS P12 Certificate

We need a cert .p12 file to manage your push notifications with our systems, but we know the process can be a bit confusing. Here is our step-by-step guide on how to get a .p12 file.

Requirements
You will need a few things before you start:

Accessing a Mac computer. NOTE: This is a requirement of Apple

An Apple developer account. Apple Developer account

You will need your email address and "name" for this process(e.g. "[email protected]", "Jo Smith").
If you are not sure of your name, please log in to your Apple Developer account and use the name that appears in the upper right corner.

The Process
Creating a p12 file can be a bit confusing the first time, as you need to use pieces of software that often go unnoticed on your computer, as well as the iOS developer web interface (which has improved in recent years).

We have divided the process into three steps, which should help you through the process:

1. Create a file ".certSigningRequest" (CSR)

  • Open Keychain Access on your Mac (search in applications / utilities).
  • In the main Access to the KeyChain window, make sure you do not have a private key already selected, otherwise this process will not work correctly.
  • From the toolbar, open the access to Keychain> Preferences.
  • In the pop-up window that appears, click the Certificates tab.

Certificate tab

  • Set "Certificate Status Online Protocol" and "Certificate Revocation List" to "Off" (as in the previous screen).
  • Close the window.
  • Go back to the toolbar, open Keychain Access> Certificate Wizard> Request a certificate from a certificate authority.

Certificate info

  • Enter the email address and common name that you used to sign up for the iOS Developer Program.
  • NOTE: The name must be the developer's name as it appears in your Apple developer account
  • Leave the CA email blank, make sure "Saved to disk" is selected and "Allow me to specify key pair information" is checked.
  • Click Continue.
  • Choose a filename and destination on your hard drive (for example,"certificate.certSigningRequest").
  • Click Save
  • In the next window, for "Key Size" choose "2048 bits".

Key Pair info

  • For "Algorithm" choose "RSA".
  • Click Continue.
  • This will create and save your certSigningRequest (CSR) file on your hard drive. A public and private key will also be created in Keychain Access with the name you previously entered (e.g. Jo Smith).

Keychain access

2. Create the ".cer" file in your Apple developer account

  • Login to https://developer.apple.com.
  • Click "Certificates, identifiers and profiles".
  • In the "Certificates" section at the top of the left pane, click "Production".
  • Click the "Add" button (+) in the upper right corner of the main panel

iOS certificates

  • In the main panel, under Production, choose "Apple SSL Push Notification Service (Sandbox and Production)" and click Continue.

Production

  • Select your App ID and click Continue.

App Id

  • Click Continue

CSR

  • Click "Choose File" and browse for the CSR file you just created from your hard drive.

Certificate generating

  • Click Continue and wait for the file to be processed.
  • Click Download to get the file, and then click the Done button at the bottom of the download.

Download

3. Install the .cer and generate the .p12

Find the .cer file you just downloaded and double click. If the certificate was not installed automatically, you will see the following (otherwise, skip the next two steps):

Keychain login

  • Make sure the drop-down menu is set to "login".
  • Click Add Open KeyChain Access again.
  • Find the two profiles that you created in Step 1.

Keychain Access

  • You should now be able to expand the "private key" profile, which should show the certificate you just added.
  • Select only these two items (not the public key) by holding down the SHIFT key and clicking both items.

Public Key

  • Right click and click "Export 2 items ..." from the pop-up.
  • In the next window, make sure the file format is ".p12" and choose a filename and destination on your hard drive.

Certificate Keys

  • Click Save.
  • Finally, you will be asked to set a password, but leave both blank.

Verifying

  • Click OK.
    NOTE: You may be prompted for the computer administrator password at this stage (possibly twice as there are two files to export). If it does, enter the password and click OK.
  • You should now have a .p12 file in your chosen location on your hard drive.

iOS P8 Certificate

Requirements
You will need a few things before you start:

  • Accessing a Mac computer NOTE: this is an apple requirement

  • An Apple developer account. Apple Developer account

    • You will need your email address and "name" for this process(e.g. "[email protected]", "Jo Smith").
    • If you are not sure of your name, please log in to your Apple Developer account and use the name that appears in the upper right corner.

1. Create a ".p8" certificate

  • Log in into your Apple Developer account.
  • Click on "Certificates, Identifiers and Profiles".
  • In the "Keys" section in the center of the left pane, click "All".
  • Click the "Add" button (+) in the upper right corner of the main panel.

All keys

  • In the main panel, under Key Description, type the name of your p8 certificate (for example, P8 certificate). Under Key Services, you need to select the option "Apple Push Notification Service (APN)".

P8 Certificate

  • Click Continue.

Key description

  • Confirm that the options you choose are correct and click "Confirm".

Key configuration

  • Click "Download" and save the p8 certificate to your hard drive.

Downloading key