APNS Configuration
To set up browser push notifications for your website on Safari, follow the below steps.
Note
Individual certificate to be provided for each website, if you have multiple websites.
Step 1: Create a Certificate Request
In this step, we will create a certificate signing request which will be used later on.
- Launch the Keychain Access app.
- Click Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority.
- Enter your email address and name, and then check the "Saved to disk" option. Click Continue.
- Save the certificate signing request (CSR) with the given name; we will need it later to create the Website Push Certificate.
Step 2: Setting up Website Push ID for APNS (Apple Push Notification Service)
- To do this, you need to log in to the Apple Developer Console. Then, we will create a unique Website Push ID for push notifications.
- Click Certificates, Identifiers & Profiles, then click on Plus, sign on Identifiers, and click "Register an App ID."
- Select "Website Push IDs" from the "Register a New Identifier list" and click Continue.
- First enter a meaningful Description.
- Then enter an identifier, it follows reverse-domain name styling. So you should enter something like "web.com.mywebsite". (Note: "web" is added automatically to the identifier)
- Click on Continue, check that everything is in order, and then click Register.
Step 3: Generating Web Push Certificate
- Click on the Certificates section, then click "+" to see all available options.
- Click on Website Push ID Certificate and Continue.
- Next, select the Website Push ID we created earlier in Step 2 and hit Continue.
- Now we need the CSR file that was created in Step 1. Browse to the file with the Choose file button, and hit Continue to upload.
- On the next screen you will see "Download Your Certificate". Download the SSL certificate, this will be used to send notifications to your Subscribers
- Now we need to install and export the Certificate. For that, double click on the downloaded certificate, this will install the certificate in the Keychain Access app.
- Let’s export the Certificate now. Open the Keychain Access app and click on Certificates in the category section.
- Right click on the Website Push ID for which we had created the certificate, you will get a menu where you need to click on Export
- While saving the certificate file, use Personal Information Exchange (.p12) format.
- Next, you will be prompted to enter a password. Please enter a password and click on "OK."
- Then click "Allow" and enter your Mac password to export the certificate to your Mac.
Step 4: Setup
- Once the domain is registered with APNS, you will receive the .p12 certificate file and the icons folder from there.
- Icons from the icons folder will be checked to see if they are in the required correct ratios as per the APNS Guidelines.
Guidelines
- Share brand logo images with below format with 100 dots per inches only:
- [email protected]
- icon_128x128.png
- [email protected]
- icon_16x16.png
- [email protected]
- icon_32x32.png
For example: icon_128x128.png & [email protected] The size of image must be 128x128.
- The file name should be icon_set_panelname.zip
- If the client wants to update icon folder , they will have to upload p12 cert as well and vice versa.
NoteDPIs can be examined and updated in a number of methods, the most efficient of which is to use the Image size option given under the Image area of the toolbar in Adobe Photoshop to review and edit the image resolution.
Pixels per inch (PPI) is a unit of measurement that is similar to DPI.
- Now, login to the Netcore CE Panel, navigate to Assets > Websites > Choose you website and click edit.
- In the configuration page turn on the Browser Push Notification Switch and under the APNS Section ,upload icon folder then the .p12 file and put in the Intermediate Certificate Password, also available on your APNS Account.(Please refer image below)
- In case of Safari, double opt-in is mandatory, so if the client wants that to happen from a sub domain, put that in the sub domain field or if it needs to be done from the main domain put the main domain in the sun domain field.
IMPORTANT
- A double-step opt-in is mandatory to enable user interaction, such as a click or tap, for web push notifications in Safari.
- If you use single-step opt-in for Chrome/Firefox and double-step for Safari, you will need to customize each separately. However, if you select double-step opt-in, it will work across all browsers.
Updated 2 days ago