Documentation > iOS

How to create an iOS APNs Certificate

Every iOS application that wants to use Apple Push Notification Services needs to have an APNS certificate. In this article we will show you how to generate an APNS certificate for your application.

Creating a CSR from your Keychain

On your MAC open Keychain Access, navigate to Certificate Assistant and select Request a Certificate From a Certificate Authority.

apns-cert-request

On selecting this option you will be directed to the Certificate Assistant, here you have to select Request is → Saved to Disk and let the CA email Address remain blank as shown below –

apns-cert-request-2

Click on continue and save the file. Your CSR is now ready!

Downloading an APNS certificate from your account

Log in to developer.apple.com and navigate to the Member Center and select Certificates, Identifiers & Profiles

apns-certificates-identifiers-profiles

apns-certificates

Select Certificates under your iOS Apps.

apns-add-a-certificate

Choose Development/Production under certificates, depending on which one you want to generate and then click on “+” button to add a certificate.

apns-certificate-type

Select Apple Push Notification service SSL (Sandbox), click on continue and select the Application ID for which you want to create the Certificate.

Then you have to upload the CSR file we created on the first step and finally we can download the certificate that has been generated.

Converting the .cer file to a .p12 certificate

Open the .cer certificate file that you just downloaded, it will open Keychain Access.

apns-convert-cer-to-p12

Select your certificate, right click and choose to export your certificate in a .p12 format. Once you have this file, you’re good to go!