Table of Contents

How to manage push notifications on the iOS application?

1. Log into your Apple Developers portal https://developer.apple.com/membercenter

2. Go to Certificates, Identifiers & Profiles

3. Go to Identifiers > App IDs tab and click the New App ID button:

4. 1. Enter your app name for the Description

(1). Enter Bundle Identifier

(2). Ensure you have created an App ID without a wildcard.

Wildcard IDs cannot use the push notification service. For example, our iOS application ID looks something com.skalfa.SkadateLite

Click Continue:

5. You should now see the info about App ID that you have created. Click the Submit button to continue.

Generating a Certificate Request

You should generate a certificate request file so that you can use it to request for a development SSL certificate later on.

6. Launch the Keychain Access application in your Mac OS X:

7. Select Keychain Access → Certificate Assistant → Request a Certificate From a Certificate Authority:

8. Enter the information required and check the 'Saved to disk' option. Click Continue:

9. Save the certificate request using the suggested name and click Save. Click Done in the next screen:

Configuring an App ID for Push Notifications

Once an App ID is created, you need to configure it for push notifications.

10. To configure an App ID for push notification, you need to select the App in the App IDs list and click the 'Settings' button for the selected App ID:

11. Configuration page opens. Scroll a page to the end, Check the 'Enable for Apple Push Notification service' option and click the 'Create Certificate' button displayed to the right of the Development Push SSL Certificate:

12. A wizard will appear. Click Continue:

13. Click the Choose File button to locate the Certificate Request file that you have saved earlier (Generating a Certificate Request section). Click Generate:

14. Your SSL Certificate will now be generated. Click Done to continue:

Make APNS certificates

15. Now you can download certificate:

16. The SSL Certificate that you download is named aps_developer_identity.cer. Double-click on it to install it in the Keychain Access application. The SSL certificate will be used by your provider application so that it can contact the APNs to send push notifications to your applications.

17. Launch Keychain Assistant from your local Mac and from the 'login' keychain, filter by the 'Certificates' category. You will see an expandable option called “Apple Development iOS Push Services”:

18. Expand this option then right click on “Apple Development iOS Push Services” → Export “Apple Development iOS Push Services …″. Save this as apns-dev-cert.p12 file somewhere you can access it. Enter the password for exporting (it can be an empty):

Enter your usual admin password for your computer to confirm and finalize the export process:

Making a .pem file

1. Open Terminal on your Mac computer and Go to the folder where you downloaded the files e.g. Desktop.

$ cd ~/Desktop/

2. Convert the .cer file into a .pem file:

$ openssl x509 -in aps_development.cer -inform der -out MessageTestCert.pem

MessageTestCert.pem file is generated in the same folder where aps_development.cer and MessageTestCert.pem are stored

3. Convert the private key’s .p12 file into a .pem file:

You first need to enter the passphrase for the .p12 file so that openssl can read it. Then you need to enter a new passphrase that will be used to encrypt the PEM file. Again for this tutorial we used “pushchat” as the PEM passphrase. You should choose something more secure and save it so you could easily access it.

Note: if you don’t enter a PEM passphrase, openssl will not give an error message but the generated .pem file will not have the private key in it.

$ openssl pkcs12 -nocerts -out
MessageTestKey.pem -in Certificates.p12

Enter Import Password:

MAC verified OK

Enter PEM pass phrase:

Verifying - Enter PEM pass phrase:

Finally, combine the certificate and key into a single .pem file:

$ cat MessageTestCert.pem MessageTestKey.pem > Final.pem

Final.em file is generated in the same folder where aps_development.cer and MessageTestCert.pem are stored

Now you will need to go to your Admin Area > Plugins > Installed Plugins > Skadate iOS > Settings > Push Notifications, check Enable Push Notification, upload Final.pem certificate file and enter PEM PassPhrase, click save.

Push Notifications are set for your iOS device!