Push Notification Setup (iOS)

Top  Previous  Next

Setting up your backend to support Push Notifications for iOS requires a few steps, most of which are in Apple Developer Member Center and Keychain Access. There are a few configuration steps in XCode as well, see the Setting Up XCode for developing Apps with Push Notifications. The process consists of the following steps:


1.Creating App ID
2.Creating Certificate Request
3.Generating an SSL Certificate
4.Configuring Backendless App/Backend with the Certificate


Creating App ID

1.First we are going to create an App ID for the mobile application which will receive Push Notifications. Login to Apple Developer Member Center. Click on “App IDs” in the “Identifiers” section. Use the plus sign “+” button to create a new ID:
2.When prompted enter App ID Prefix. Make sure it is descriptive enough so you recognize it later when you return to the Member Center.
3.Select Explicit App ID in the “App ID Suffix” section and enter the same bundle ID which you will be using in the application:
4.In App Services select the services which the application will use and click “continue”:
5.Make sure that Push Notifications are enabled and click “submit”. This will conclude the App ID creation for the app:


Creating Certificate Request

Push Notifications require a certificate which will be used on a device by the means of a provisioning profile. Also the same certificate (transformed to the Personal Information Exchange – .p12 format) will be used by Backendless to publish Push Notifications. If this makes little sense, do not worry, you will need to perform these steps only ones and then can move on to code and using the APIs.

1.In order to create a certificate a Certificate Signing Request (CSR) must be issued. To create a CSR, open Keychain Access and select Keychain Access >> Certificate Assistant >> Request a Certificate from the main menu:
2.Enter your email address and Common Name (leave the CA Email Address field empty), select “Saved to disk” and click “Continue”:
3.Select a directory where to save the file and click Save.


Generating an SSL Certificate

The CSR file created in the section above will be used to create an SSL Certificate. That certificate will then be used by Backendless to publish push notifications.

1.Return to Apple Developer Member Center and select “All” under “Certificates”. Click the plus button “+” to add a new certificate:
2.Select certificate type – there are two options Development and Production. For now select “Apple Push Notification service SSL (Sandbox)”:
3.Select the App ID created earlier in these instructions:
4.Next you will see the instructions for generating a CSR which you have already created by now. Click Continue to proceed to the next step.
5.Select the CSR file created and saved to the disk earlier and click Generate:
6.The certificate is ready now, click “Download” to download it:
7.Add the certificate file to Keychain Access.
8.Open Keychain Access and locate the certificate in the “My Certificates” section:
9.Right click on the certificate and select the Export option:
10.Save the certificate in the p12 format:
11.Enter a password for the certificate. Make sure to make a record of the password – you will need to use it later in the instructions when you submit the certificate to Backendless:
12.Enter your Mac OS X account password to confirm the action. At this point you have a certificate for Push Notifications.


Configuring Backendless App/Backend with the Certificate

Since Backendless provides the actual server-side integration for delivering Push Notifications for your application, it needs to have access to the certificate you created above. The steps below provide the instructions for uploading the certificate into Backendless:

1.Login to Backendless Console at: https://backendless.com/develop and create/select an application which you will use on the server-side:
2.Click Manage > App Settings. Locate the Mobile Settings section and upload the .p12 certificate created earlier. Make sure to enter the same password you used when created the certificate:
3.Now your Backendless server is ready to publish Push Notifications.

Please let us know how we can improve the documentation by leaving a comment. All technical questions should be posted to the Backendless Support forum. We do not respond to the technical questions on the documentation pages.: