Enabling Push Notifications in Xcode project
- Choose View → Navigators → Show Project Navigator.
- Choose the target from the Project/Targets pop-up menu or in the Targets section of the second sidebar if it appears.
- Click Capabilities to view app services you can add to your app.
- In the Capabilities pane, if Push Notifications isn’t enabled, click the switch in the Push Notifications section.
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
.p8file extension in the Downloads folder.
- Click Done.
- Proceed with Configure Push Notifications for WordPress
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.
You have to follow those steps:
- Go to Push Notifications → Settings → iOS tab.
- Enter the Bundle ID of your app.
- Enter the Key ID generated.
- Enter your team ID.
- Paste the content of the
p8file you have generated, as is.
- Click Save Settings.