Generate APNS certificate for iOS Push Notifications
Published in
4 min readJul 18, 2016
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
- Login to Apple developer account and click Certificates, Identifiers and Profiles
- 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