iOS Push Notification Integration - RedTroops/IOS-SDK GitHub Wiki

iOS Push Notification Integration

To enable Push Notification for your iOS app, we will need you to create and upload the Apple Push Notification Certificate (.pem file) to us so we will be able to connect to Apple Push Server on your behalf.

First of all login into your developers account – https://developer.apple.com/account

you will be redirected to following screen, Click on “Certificates”.

####Step 1:

Click “+” button

####Step 2:

Select “Apple Push Notification service SSL (Production)” and click “Continue” Note: If you are testing, use the (Development - Sandbox)

####Step 3:

Now, Select the app ID drop Drop down list and click on “Continue” to go to the next step.

####Step 4:

Follow the steps under “About Creating a Certificate Signing Request (CSR)” for Creating Certificate Signing Request

In addition to the instructions provided by Apple, Here are some additional screenshots to guide you creating required certificate.

####Step 4.1:

Select “Request a Certificate From a Certificate Authority” by navigating “Certificate Assistance” from toolbar options for keychain.

####Step 4.2:

Fill the required certificate Info. – select “Saved to disk” and select “Continue”

####Step 5:

Upload “.certSigningRequest” file which was generated (in Step 4), then click “Generate”.

####Step 6:

Now Click “Done” to finish the registration,the page will be refreshed and you will see this screen

Then Click “Download” button to download the certificate (.cer file) you’ve created just now and then double click the downloaded file to install the certificate into Keychain Access on your Mac.

####Step 7:

Now go to “Keychain” on you mac system, look for the certificate you have just installed. If you are unsure which certificate is the correct , it should start with “Apple Production IOS Push Services”and followed by app’s bundleID.

####Step 8:

Expand the certificate, you should see the private key with either your name or your company name. Select both items by using the “Select” key on your keyboard, right click (or cmd-click if you use a single button mouse), choose “Export 2 items”, like Below:

Then save the p12 file with name “pushcert″ as "p12" to your Desktop – now you will be prompted to enter a password to protect it, you can either click Enter to skip the password or enter a password you desire.

####Step 9:

Now the most difficult part – open “Terminal” on your Mac, and run the following commands

cd
cd Desktop
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts

Step 10 (Optional): Remove pushcert.p12 from Desktop to avoid mis-uploading it to Build Your Own area. Open “Terminal” on your Mac, and run the following commands:

cd
cd Desktop
rm pushcert.p12

Now you have successfully created an Apple Push Notification Certificate (.pem file)! You will need to upload this file to Developer Website