Skip to content

Latest commit

 

History

History
129 lines (97 loc) · 3.89 KB

GenerateAPNSCertificate.md

File metadata and controls

129 lines (97 loc) · 3.89 KB

Follow these steps to generate p12 or p8 file for push notification:

Generate p12 certificate

Create an App ID

  1. In your developer account, go to Certificates, Identifiers & Profiles.
  2. Under Identifiers, select App IDs and create a new App ID.

  1. Specify App name, Bundle ID and select Push Notifications, then Continue

  1. Click Register, then Done to complete app registration

  1. Now, you can see the app listed in App IDs

Generate a Certificate from Keychain Access

  1. Launch the Keychain Access application in your Mac OS X and Select Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority

  1. Enter email address and check the ‘Saved to disk’ option, then click Continue

  1. Save certificate

Generate a Development Certificate

  1. Go back to developer account and select app from App IDs and click Edit

  1. Scroll Down to Development SSL certificates and click Create Certificate

  1. Click Continue

  1. Choose certificate file created from Keychain Access in previous section and click Continue

  1. Download Development Certificate and click Done to finish process

Generate APNS .p12 certificate

  1. Double click Development certificate generated in previous step to add it to Keychain Access. Go to Keychain Access, select login keychain and My Certificate from side menu. Find app certificate and right click to export it

  1. Enter certificate name and click Save

  1. Enter password for certificate and click OK

This development .p12 certificate can be used to send push notification.

Generate p8 certificate

Create the p8 file and get the Key ID

  1. In your developer account, go to Certificates, Identifiers & Profiles.
  2. Under Keys, select All and click the Add button (+) in the upper-right corner.
  3. Under Key Description, enter a unique name for the signing key.
  4. Under Key Services, select the APNs checkbox, then click Continue.

  1. Review the key configuration, then click Confirm.
  2. Click Download to generate and download the key now. If you download the key, it is saved as a text file with a .p8 file extension. Save the file in a secure place because the key is not saved in your developer account and you won’t be able to download it again.

Get the Team ID

  1. In your developer account, go to Membership.
  2. Get the Team ID.