What Apple Push Notification service is
Apple Push Notification service, APNs, is Apple's service for delivering remote notifications to apps on Apple devices. A company's server sends each notification to APNs, and Apple delivers it to the device, where the system presents it to the user.
Push notifications to apps on iPhone, iPad, Mac and Apple Watch go through it, sent directly or through a push provider such as Firebase Cloud Messaging or OneSignal, which use APNs for Apple devices. That is why it is one of the push channels our notifications module connects to.
What it does in your platform
Notifications
Delivers the platform's push notifications to your app on Apple devices: payment and security alerts, delivery updates and, for customers who opted in, campaigns. When a device token is no longer active, APNs says so, and critical alerts can fall back to a second channel.
How the connection works
One connector in the notifications module talks to APNs over HTTP/2, authenticated with tokens it signs with your APNs key. Your apps never hold the key: they only hand the platform their device token.
The app registers
At launch, your app asks Apple for a device token, a unique address for that app on that device, and sends it to the platform.
A payment is made
The module builds the notification from the template your team edited in the backoffice, in the customer's language.
The platform calls APNs
It posts the notification and the device token to Apple's production server, with a JSON Web Token signed with your key and renewed at least once an hour.
Apple delivers it
APNs delivers the notification, or stores it until the device comes online, keeping one notification per app, usually the latest.
APNs answers
Each request gets a status. When a device token is no longer active, APNs says so, with the time it noticed: the signal to stop sending to that token.
A fallback for what matters
APNs is a best-effort service, which is why critical alerts can fall back to a second channel, such as SMS.
Next to other providers
Push notifications run on the provider you prefer. The platform can talk to APNs directly for Apple devices and to Firebase Cloud Messaging for Android, or send through OneSignal, which delivers through APNs and Firebase Cloud Messaging with your credentials.
Templates, preferences and quiet hours belong to the module, not to the push service, so they stay the same whichever way a notification is delivered.
When Apple Push Notification service fits best
A strong fit when
- You want push to Apple devices with no other service between your platform and Apple.
- You already use Firebase Cloud Messaging for Android and want to handle Apple devices directly.
- You want to test notifications and read delivery logs in Apple's own Push Notifications Console.
Also worth a look
- Firebase Cloud Messaging, which also reaches Apple devices, through APNs.
- OneSignal, when your team wants Apple, Android and web push in one place.
How we get you live
The developer account
Push runs under your company's Apple developer account. We help you enable push for your app's App ID and the Push Notifications capability in the app.
The notifications
We set up with you which events send a push, in which languages, and with which actions on the notification.
The key
The APNs signing key and its Key ID go into your platform's secrets and nowhere else, with separate keys for testing and production, as Apple recommends.
A full test run
Notifications go first through Apple's development server to test builds of your app, checked in the Push Notifications Console, before your first customer push.
