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

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

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
  • Enter email address and check the ‘Saved to disk’ option, then click Continue
  • Save certificate

Generate a Development Certificate

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

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

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

Zero Equals False

Zero Equals False delivers quality content to the Software community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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