Apple push notification service
This page shows you how to receive Stream Video push notifications using Apple Push Notification service (APNs).
In order to get started, you would need to have a paid Apple developer account, and a registered App ID with push notifications capability enabled.
Get the iOS certificate for push notifications
- Create a push notification service key via Apple’s Developer Portal, ensuring Apple Push Notifications service SSL (Sandbox & Production) is selected, then click Continue.
Choose the App ID of your app, then click Continue.
Create a Certificate Signing Request (CSR) by following these steps and upload it in the portal, then click Continue.
Press on the Download button to get a .cer file.
Convert the .cer file into a .p12 certificate file:
- Double click the .cer file to add the certificate to the login keychain.
- Go to Applications -> Utilities -> Keychain Access.
- Ensure you have selected the “login” keychain.
- Go to the Certificates tab, look for the certificate, right-click, and export it as a .p12 file.
- Ensure no password is set when exporting.
Upload the certificate and create a push provider
In order to configure push notifications, you need to visit your app’s Stream Dashboard page. From there, select the Push Notifications
menu option as you can see in the image below:
From there you can create a new configuration by clicking the New Configuration
button. After selecting the APN
Provider, you will be asked to provide the following information:
Field Name | Usage description |
---|---|
Name | Used to select this configuration in SDK or API calls. |
Description | Allows you to set a description on the configuration to help identify its usage in your app’s context. |
Bundle/Topic ID | Your app’s bundle id to which the notification will be pushed to. |
TeamID | The Team ID is generated by Apple for your developer account. Can be found in the top right of your Apple developer account. |
KeyID | This is the unique identifier for the p8 authentication key. You can find your Key ID in the keys section of your Apple developer account. |
.p8 Token or .p12 Certificate | The token or certificate that will be used to send the push notification. |
Provide a name for the push provider in the Name field. This name will be used in your code to configure iOS push notifications.
Add your app’s bundle id in the Bundle/Topic ID field.
Upload the .p12 file generated in the previous step, along with the necessary Apple details.
Enable this provider using toggle button.
Click Create to finalize the configuration.
For our example, we are using voip
as name and we are filling the remaining information as you can see in the image below: