Enable Push Notifications in Xcode
- In the project editor, choose a target and click Capabilities.
- In the Push Notifications section, click the switch to turn it from
Generate and export an APNS client TLS certificate from the Apple developer portal
Generate an APNS client TLS certificate
You need to generate a separate client TLS certificate for each app you distribute that uses push notifications including Development and Production versions.
It is important that you generate a Development (Sandbox) Push Notification certificate to use with a Development Provisioning Profile, and/or a Production Push Notification certificate to use with an Ad Hoc or Distribution Provisioning Profile. They will be used in 2 separate applications within Accengage Dashboard (see below) and it will be important that you respect this differentiation.
Generating the certificate fully enables push notifications for the associated App ID. In your developer account, you will notice that the Push Notifications service for the App ID changes automatically from Configurable to Enabled.
- In your developer account, go to Certificates, Identifiers & Profiles and if necessary, choose the operating system from the pop-up menu on the left (for macOS apps, choose OS X).
- Under Certificates, select All.
- Click the Add button
+in the upper-right corner.
- Under Production, select the “Apple Push Notification service SSL (Sandbox & Production)” checkbox, then click Continue.
- Choose an App ID from the App ID pop-up menu, and click Continue.
- Choose the explicit App ID that matches your bundle ID.
- Follow the instructions to create a certificate signing request on your Mac, and click Continue.
- Click Choose File.
- In the dialog that appears, select the certificate request file (a file with a
.certSigningRequestfile extension), and click Choose.
- Click Continue.
- Click Download and double-click the downloaded file (a file with a
.cerfile extension) to add the certificate to your keychain.
- Click Done.
Create a certificate signing request
Launch Keychain Access located in
- Choose Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.
- In the Certificate Assistant dialog, enter an email address in the User Email Address field.
- In the Common Name field, enter a name for the key (for example, Gita Kumar Dev Key).
- Leave the CA Email Address field empty.
- Choose “Saved to disk”, and click Continue.
Export the client TLS identity from your Mac
Export the identity from the keychain on the Mac where you created it, and copy it to the appropriate place on the server that runs the provider code and connects with the development or production version of APNs.
- Launch Keychain Access.
- In the Category section, select My Certificates.
- Find the certificate you want to export and disclose its contents.
- You’ll see both a certificate and a private key.
- Select both the certificate and the key, and choose File > Export Items.
- From the File Format pop-up menu, choose a file format that your server accepts.
- Enter a filename in the Save As field, and click Save.
- The certificate and key are saved to the location you specified as a text file in the Personal Information Exchange format (a file with a