Create APNs token
For iOS, we use Apple Push Notification service (APNs) to send push notifications. To be able to use this, you need to create an APNs token for your application:
1. Create an APNs provider authentication token
- Log in to the Apple Developer Program Portal.
- Go to Certificates, Identifiers & Profiles.
- From the left-side menu, select Keys. Next, click the + button to register a new key.
- Add a Key Name and optionally a Key Usage Description.
- Tick the ENABLE box for Apple Push Notifications service (APNs), then click the Configure button.
- In the Environment dropdown menu, select the desired option, then click the Save button.
- Click the Continue button, then click the Register button.
- Copy the displayed Key ID (
KeyID) and store it in a secure place. - Click the Download button to download
.p8file containing the token, then store it in a secure place.
2. Find your Team ID
- In the Apple Developer Program Portal, click Membership details.
- Copy the Team ID and store it in a secure place.
3. Find your Bundle ID
- In the Apple Developer Program Portal, click Program resources.
- Under the Certificates, Identifiers & Profiles section, click Identifiers.
- Select the application that you are configuring the APNs token for.
- Copy the Bundle ID and store it in a secure place.
4. Add to enabled capabilities
You need to add push notifications as enabled capabilities for the provisioning profile when you are publishing your app. To do this:
- In the Apple Developer Program Portal, click Program resources.
- Under the Certificates, Identifiers & Profiles section, click Identifiers.
- Select the App ID that you want to update, then click Edit.
- Select the checkbox to enable push notifications.
Tip
You can also enable any other app capabilities that you want to allow, such as time-sensitive notifications.
To learn more about this, see the Time-sensitive notifications section in our iOS SDK Push notifications documentation. - Click the Save button.
Note
If a warning dialogue box appears, then click the Confirm button to finalise your changes.