Registering with Apple
You are required to register in the Certificates, Identifiers & Profiles section of the Member Center to send push notifications. Registration requires an Apple Developer Program membership.
When registering, include the following information:
- Identifier. This is your unique reverse-domain string, such as
web.com.example.domain
(the string must start withweb
.). This is also known as the Website Push ID. - Website Push ID Description. This is the name used throughout the Provisioning Portal to refer to your website. Use it for your own benefit to label your Website Push IDs into a more human-readable format.
Obtain an Encryption Key and Key ID from Apple
You need an APNs authentication token signing key to generate the tokens used by your server. One token is enough to distribute notifications for all of your company’s apps, allows your app to connect to both the development and production environments and doesn't expire.
To create the private key:
- Go to your Apple's dev center.
- In Certificates, Identifiers & Profiles, select Keys from the sidebar
- Click the Add button (+) in the upper-left corner.
- Under Key Description, enter a unique name for the key.
- Select the checkbox next to the capabilities you want to enable, then click Continue.
- Review the key configuration, then click Confirm.
- Click Download to generate and download the key, it is saved as a text file with a
.p8
file extension in the Downloads folder. - Click Done.
- Proceed with Creating a Website Push Client SSL Certificate
WARNING: Save this file in a secure place because the key is not saved in your developer account and you won’t be able to download it again. If the Download button is disabled, you previously downloaded the key.
Creating a Website Push Client SSL Certificate
You use Member Center to generate a push notification client SSL certificate that allows your notification server to connect to the APNs. Each Website Push ID is required to have its own client SSL certificate.
To generate a website push client SSL certificate:
- In Certificates, Identifiers & Profiles, select Certificates.
- Click the Add button (+) in the upper-right corner.
- Under Production, select the "Website Push ID Certificate" checkbox, and click Continue.
- Choose the explicit Website Push ID that matches your Website Push ID from the pop-up menu, and click Continue.
- Follow the instructions on the next webpage to create a certificate request on your Mac, and click Continue.
- Click Choose File.
- In the dialog that appears, select the certificate request file (with a
.certSigningRequest
extension), and click Choose. - Click Generate.
- Click Download and save the file (
website_aps_production.cer
). - Click Done.
Generate the SSL certificate for Push Notifications for WordPress
- Load
website_aps_production.cer
in the Keychain Access double-clicking on it. - From the Keychain Access application select the certificate (search for "Website Push ID") and press the right mouse button.
- Select "Export" and save it as
Certificates.p12
using a password that you remember (the one you will use in Push Notifications for WordPress as P12 Certificate Password).
Configure Push Notifications for WordPress
- Go to Push Notifications → Settings → Safari tab.
- Click the Upload button for P12 Certificate.
- Drag and drop the
Certificates.p12
file. - Click Select.
- Enter the password you have selected for this certificate.
- Enter the Website Push ID for this website.
- Enter the Key ID generated.
- Enter your team ID.
- Paste the content of the
p8
file you have generated, as is. - Click the Upload button for the 16x16 (
.png
) icon. - Drag and drop the icon file.
- Click Select and repeat for each icon size.
- Click Save Settings.
Renew a Website Push Client SSL Certificate
To renew a website push client SSL certificate:
- In Certificates, Identifiers & Profiles, select Website Push IDs.
- Choose the explicit Website Push ID that matches your Website Push ID from the pop-up menu, and click Edit.
- Press Create Certificate..., follow the instructions on the next webpage to create a certificate request on your Mac, and click Continue.
- Click Choose File.
- In the dialog that appears, select the certificate request file (with a
.certSigningRequest
extension), and click Choose. - Click Generate.
- Click Download and save the file (
website_aps_production.cer
). - Click Done.
Then follow Generate the SSL certificate for Push Notifications for WordPress and Configure Push Notifications for WordPress to use the renewed certificate in Push Notifications for WordPress.