In order to be able to send web push notifications to the Safari browser, it is required to have a certificate from Apple Push Notification service (APNS). This document details how to obtain the certificate needed.
Obtaining a certificate for Apple Push Notification Service
Create a Certificate Request
- On a Mac, launch the KeyChain Access app.
- Select Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority...
- Enter the email address and common name. Leave CA Email Address blank.
4. Select Save to disk and then Continue.
- Choose the folder the file is to be saved in and click Save, followed by Done.
Register the certificate with Apple
- Log in to your developer account at https://developer.apple.com, and navigate to Identifiers. In the window displayed, click the + symbol and select Web Push IDs radio button. Followed by Continue.
- Enter the description and a unique identifier for the certificate.
- Click Continue and then Register after checking the details are correct.
- On the Certificates section, click the + symbol and then select Web Push ID Certificate . Followed by Continue
- Select the Website Push ID created previously on step 8 from the drop down menu and click Continue.
- Upload the CSR file generated from your Mac on step 5 and click Continue.
- Download the Certificate.
- To install and export the certificate, so that it can be added to the Emarsys account, double click the file downloaded from your Apple Developer account.
- The Keychain Access app will open. Click "My Certificates" tab (not "All tabs") and you can see the certificate listed in the file list.
Right click the file and select Export.
- Click Save.
- Enter a Password for the certificate and click OK.
It is recommended to choose a secure password. The password will be required when uploading the certificate to Emarsys.
Add APNS Certificate to Emarsys
- In the Emarsys account, go to Channels > Web Push > Domains tab.
- Click Details to the right of the Domain.
- Click Add APNS.
- Update the fields:
- Website name: Name of the website.
- Allowed domains: The domains allowed to send push messages. Please enter each domain to include https:// and separate multiple domains on separate rows.
- Website icon: Default icon that should have 72DPI.
- Key file (.p12): Upload the p12 file created
- Private key password: Enter the password used when exporting the file on step 16.
Please note that changing any of the details entered above on step 20 later in the integration will result in the contacts being asked for push permission again, even if they provided push permission previously.
- Click Save.