In order to implement Push Notifications, a paid Apple developer account is required. Students or other developers with a personal Apple ID for their team will not be able to use push notifications, because they will not have access to the Developer Portal to generate the required certificate.
To enable your app for push notifications, you need to carry out the following tasks:
-
Obtain a certificate signing request
In order to use the Apple Push Notification service, you need to create a CSR file.
On your Mac, open the Keychain Access application, and navigate to Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority…
In the dialog, enter the email address which is associated with your Apple Developer account. Also, make sure you check the Request is saved to disk option.
Click Continue.
Choose a folder to store the certificate – it is good practice to store generated files in a separate folder for each project – and click Save.
Once you see a dialog saying the certificate is saved successfully, click Done to finish.
-
Register an iOS App ID
Go to your Apple Developer Account and click Certificates, Identifiers & Profiles.
Click + icon to register a unique Identifiers for your application.
Select App IDs and click Continue.
Provide a unique Bundle ID name and Description.
Scroll down and select the Push Notifications capability from the list, click Continue.
In the following screen, select option for Deployment Details and then click Continue.
Confirm your App ID by clicking on Register.
-
Create a new development certificate .CER file
Under Identifiers, search for the App ID that you registered in previous step.
Scroll down and select the Push Notifications capability, click Configure.
To configure push notifications for the App ID com.sap.mdk.demo
, a Client SSL Certificate is required that will allow the notification server to connect to the Apple Push Notification Service. Each App ID requires its own Client SSL Certificate.
Click Create Certificate to start the process for creating the needed .CER
file.
Click Choose File and browse to the downloaded Signing Request CSR
file, click Continue.
Apple will now create a .CER
file for you which is issued by the Apple Worldwide Developer Relations Certification Authority.
Click Download to download your certificate.
-
Install the .CER file and create the .p12 file
In order to configure the APNS
on SAP Cloud Platform Mobile Services, you need to install the .CER
file and create the needed .p12
file.
A .p12
file is a encrypted container for the certificate and private key. This file is needed by Mobile Services for the APNS
configuration.
Locate your downloaded .CER
file and double-click it in order to install the certificate.
In case the Add Certificate dialog pops up make sure to choose Login from the dropdown and click Add.
If the certificate is added correctly to the Keychain you should see it in the MyCertificates
section, make sure you selected login as keychain.
Select the certificate as well as the private key and right-click to export those two items.
Make sure that in the dropdown Personal Information Exchange (.p12) is selected and click Save. You will be prompted to enter a password, click OK to export the files.
-
Register your device
Click + icon to register your iOS device.
Provide Device Name & Device ID (UDID) and then click Continue.