APNS instruction

Ask tech team
From QuickBlox Developers (API docs, code samples, SDK)
Jump to: navigation, search

Contents

Generate APNS certificate for iOS Push Notifications

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

Image.4O1ZNZ.png

Select iOS from dropdown

Image.AI12NZ.png

Select App IDs from side menu and create a new App ID

Image.DKZTNZ.png

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

Image.D55ZNZ.png

Click Register, then Done to complete app registration

Image.YAC0NZ.png

Now, you can see the app listed in App IDs

Image.ABJ8NZ.png

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.S825NZ.png

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

Image.CW2PNZ.png

Save certificate

Image.EZ6SNZ.png

Generate a Development Certificate

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

Image.GKC5NZ.png

Scroll Down to Development SSL certificates and click Create Certificate

Image.GGEYNZ.png

Click Continue

Image.3UV8NZ.png

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

Image.B1QMNZ.png

Download Development Certificate and click Done to finish process

Image.FECNNZ.png

Generate APNS .p12 certificate

Double click APNS 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.6KX2NZ.png

Enter certificate name and click Save

Image.O3C2NZ.png

Enter password for certificate and click OK

Image.SK2VNZ.png

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