Generate APNS certificate for iOS Push Notifications

Ankush Aggarwal
Jul 18, 2016 · 4 min read

Apple Push Notification Service (commonly referred to as Apple Notification Service or APNS) is a platform service created by Apple Inc. that enables third party application developers to send push notifications to iOS users. You must have Paid Apple Developer account to create certificates. Below are the steps to create .p12 certificate require to send push notification.

Create an App ID

Image for post
Image for post
  • Select iOS from dropdown
Image for post
Image for post
  • Select App IDs from side menu and create a new App ID
Image for post
Image for post
  • Specify App name, Bundle ID and select Push Notifications, then Continue
Image for post
Image for post
  • Click Register, then Done to complete app registration
Image for post
Image for post
  • Now, you can see the app listed in App IDs
Image for post
Image for post

Generate a Certificate from Keychain Access

  • Launch the Keychain Access application in your Mac OS X and Select Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority
Image for post
Image for post
  • Enter email address and check the ‘Saved to disk’ option, then click Continue
Image for post
Image for post
  • Save certificate
Image for post
Image for post

Generate a Development Certificate

  • Go back to developer account and select app from App IDs and click Edit
Image for post
Image for post
  • Scroll Down to Development SSL certificates and click Create Certificate
Image for post
Image for post
  • Click Continue
Image for post
Image for post
  • Choose certificate file created from Keychain Access in previous section and click Continue
Image for post
Image for post
  • Download Development Certificate and click Done to finish process
Image for post
Image for post

Generate APNS .p12 certificate

  • 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
Image for post
Image for post
  • Enter certificate name and click Save
Image for post
Image for post
  • Enter password for certificate and click OK
Image for post
Image for post
  • Enter your computer admin password to finish the process
Image for post
Image for post

Boom! This development .p12 certificate can be used to send push notification. See below references for server code to send push notification to iOS device.

See references for push notification server and client code on github.

If this post was helpful, please click the clap 👏button below a few times to show your support! ⬇⬇

Some good references

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store