Connector · Apple's push delivery service

APNs, on your customers' iPhones.

How our notifications module uses Apple Push Notification service, APNs, to reach your customers on their iPhones and other Apple devices: how a notification travels, what Apple needs from you, and how we get you live.

Website
developer.apple.com
Modules
Notifications
SDKs
iOS, iPadOS, macOS, watchOS, tvOS, visionOS
Access
Your Apple developer account

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.

  1. 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.

  2. A payment is made

    The module builds the notification from the template your team edited in the backoffice, in the customer's language.

  3. 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.

  4. Apple delivers it

    APNs delivers the notification, or stores it until the device comes online, keeping one notification per app, usually the latest.

  5. 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.

  6. 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.

Questions

Asked about this connector.

How do we get started with Apple Push Notification service?

Talk to us. Push runs under your company's Apple developer account: we help you enable it for your app, create the signing key and connect it to your platform, then test in Apple's development environment before launch.

Do we need APNs if we use Firebase or OneSignal?

Yes, underneath. Both deliver to Apple devices through APNs, so your APNs key is set up either way. The difference is whether the platform talks to Apple directly.

Is every push delivered?

Apple delivers on a best-effort basis: a notification can be delayed, stored until the device comes online, or not delivered at all. Critical alerts can fall back to another channel, such as SMS.

What happens to old device tokens?

When a device token is no longer active, APNs says so in its answer to the next notification, with the time it noticed, so the platform knows to stop sending to it.

Start your project

Tell us the idea. We'll show you the platform.

One call is enough to map your product to the modules that already exist.

  • Response in under one business day
  • NDA on request
  • No obligation
What are you building?