Safari Certificate
Instruction how to generate Safari certificate.
Last updated
Instruction how to generate Safari certificate.
Last updated
Currently it's legacy method - new Safari browsers (since 16) support PushAPI and VAPID. Use this instruction only when you want to support old Safari Browsers.
Integration with Apple Push Notification Service allows you to send push notifications through Safari browser.
Authorization takes place via certificates, therefore in order to integrate your project with APNS, you will need to request a certificate in a p.12 file format from a Certificate Authority in your Certificate Assistant first.
Integration content:
certificate store - store containing a private key and a public key issued for a specific appBundleId,
passphrase for a certificate - can be empty if the store is not secured with a password
To generate Safari certificate you need to create Certificate Signing Request first.
For this purpose launch the Keychain Access app.
Click on Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority.
The Assistant window will appear. Enter your e-mail address and name for your certificate. Then check Saved to disk option and click Continue.
Save the Certificate Signing Request (CSR). You will need it to generate a certificate.
Log into your Apple Account. Here you will need to create Website Push ID for your project. In order to do that, go to Certificates, Identifiers & Profiles section.
Select Identifiers tab and click "+" icon to add a new ID.
Check Website Push IDs option and confirm your choice by clicking Continue.
Type description for your project in Description input. In Indentifier input enter the url of your domain (where you want to display the sign-up form). Remember to enter the url the opposite way, e.g. web.com.porannakawka.testppg. This is known as the Reverse Domain Style.
Click Continue and check if everything is correct. If so, confirm with the Register button.
Go to Certificate tab in Certificates, Identifiers & Profiles section. You will see a list of certificates you have created here. Click "+" icon.
Scroll down to "Services" part, check Website Push ID Certificate option and click Continue.
Select the Website Push ID you have created earlier from the list and click Continue.
Now you have to click on the Choose File button and select the CSR (Certificate Signing Request) you have generated. Proceed with Continue button.
Download your certificate. Now we need to install it and export it. ⚠️ Double click on downloaded certificate, this will install the certificate in the Keychain Access app.
The installed certificate will appear in Keychain Access (which you have used to create CSR). Right click on the certificate and select Export "Website Push ID:...".
Save certificate using Personal Information Exchange (.p12) format.
Enter password and remember it - you will need to pass it to integrate your project with APNS.
Certificate has been saved on your device. It is ready to upload in our app.
Go to the Providers page (left-side navigation > Providers page).
There, depending on the plan and whether your offer contains also sending mobile pushes, the Safari integration tile will be visible:
at the top of the page (without mobile pushes enabled)
in a “Web push” section (if mobile push is on).
The next step is to upload the certificate store in the p12 file format and enter its passphrase (if required).
ℹ️ Here you'll find an alert about the approaching certificate expiration. We will inform you 30 days before the date.