How to create .P12 certificate for Safari push notifications

Here are the details to create and upload a .P12 certificate from your apple account. It will take you a few minutes to create.

PreRequisites: 

  1. A Paid Apple Developer Subscription
  2. Mac System.

Here are the steps you will need to do

Step 1: Make a request for Certificate

Step 2: Request from KeyChain Access

Step 3: Creating a Web Push Certificate

Step 4: Uploading the .p12 file(web push certificate) on TruePush

Step 1: Make a request for Certificate

 Go to https://developer.apple.com/account  and login 

Once you login to your account. Click on the Certificates, ID & Profiles tab

Once you enter the tab, click on the Certificates ‘+’ Icon.

Then you need to scroll down on the next page and select Website Push ID Certificate

Create a new certificate or click on an existing one from the website Push ID field. Once you are done. Click Continue. 

Step 2: Request from Keychain Access

In your Mac system. Open your KeyChain Access

Then click on Request a Certificate from a Certificate Authority

Give a common name(your certificate name) and select Saved to disk. Click Continue 

Create a new folder and save the file.

Once you save, it should look something like the below image.

Come back to the Create a New Certificate page we left before in Step 1: and upload the downloaded certificate. Then click Continue.

Once you come to the next page, you need to be able to see a screen like below. Click on download.

Save in the same folder(optional) as you did before. You should be able to see like below.

Click on the Certificate and open with Keychain Access

In KeyChain Access, you should be able to see your created Private Key and Certificate paired. Select both of them and right-click. You should be able to an image like below. Click on Export 2 Items.

Select the folder like before. Save your certificate. This is your .p12 certificate that you need to upload on TruePush.com

While saving, it will prompt you for a password to safeguard your certificate(for .p12 certificate). This is an optional action but we highly recommend you to have a password for security reasons. 

Next, it will prompt you for your system password twice.

Once done you should be now getting the final .p12 certificate to upload on TruePush.com. 

Upload the .p12 certificate by clicking the choose file. If you have kept a password for .p12 file while creating as suggested, please enter the password and click Save. 

Boom! Your Safari  Browser notification will start working.

 

PS: Please see that for safari, only 2-way notifications work. So when you select a default option to show in the opt-in type. For safari, we will have Bell Icon by default.