Photo by Jamie Street on Unsplash
Do you know we can set up iOS Push Notification using APNs Auth Key (token-based)? If not, keep reading.
This week I was setting up Push Notification for iOS in one of our marketing tools (Responsys) and, I noticed you can choose APNs Auth Key (Token-based) over Certificate-based connection to APNs.
This way, we could use
- Same token for multiple providers server
- One token to distribute notifications for all your company's app
- We don't have to renew the Push notification certificates every year as we do with Certificate-based.
How do you achieve this -
- Log in to your Developer Account
- Go to Certificates, Identifiers & Profiles
- Keys section
- Add
- Register a New Key
- Enter the key's name
- Select the APNs service
- Go to the next step
When you request a key, Apple gives us the following -
- A 10-character string with the Key ID
- An authentication token signing key, specified as a text file (with a .p8 file extension)
Note: We need to secure both pieces of information carefully.
You can learn more about this at - https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns
Top comments (0)