Contents

Setting up a remote notification server

Generate notifications and push them to user devices.

Overview

Use remote notifications (also known as push notifications) to push small amounts of data to devices that use your app, even when your app isn’t running. Apps use notifications to provide important information to users. For example, a messaging service sends remote notifications when new messages arrive.

The delivery of remote notifications involves several key components:

  • Your company’s server, known as the provider server

  • Apple Push Notification service (APNs)

  • The user’s device

  • Your app running on the user’s device

Remote notifications begin with your company’s server. You decide which notifications you want to send to your users, and when to send them. When it’s time to send a notification, you generate a request that contains the notification data and a unique identifier for the user’s device. You then forward your request to APNs, which handles the delivery of the notification to the user’s device. Upon receipt of the notification, the operating system on the user’s device handles any user interactions and delivers the notification to your app.

[Image]

You’re responsible for setting up a provider server (or servers) and for configuring your app to handle notifications on the user’s device. Apple manages everything in between, including the presentation of notifications to the user. You must also have an app running on the user’s device that can communicate with your server and provide necessary information. For information about how to configure your app to handle remote notifications, see Registering your app with APNs.

Build custom infrastructure for notifications

Setting up a remote notification server consists of a few key tasks. How you implement these tasks depends on your infrastructure. Use the technologies that are appropriate for your company:

Establish a trusted connection to APNs

Communication between your provider server and APNs must take place over a secure connection. Creating a secure connection requires installing the AAA Certificate Services root certificate and SHA-2 Root : USERTrust RSA Certification Authority certificate on each of your provider servers.

If your provider server runs macOS Sequoia or later, both AAA and UserTrust Certificate Services root certificate are in the keychain by default. On other systems, you might need to install this certificate yourself. You can download the “AAACertificateServices 5/12/2020” certificate from the Sectigo KnowledgeBase website and “SHA-2 Root : USERTrust RSA Certification Authority” certificate from the SHA-2 Root : USERTrust RSA Certification Authority certificate website.

To send notifications, your provider server must establish either token-based or certificate-based trust with APNs using HTTP/2 and TLS. Both techniques have advantages and disadvantages, so decide which technique is best for your company.

Understand what APNs provides

APNs makes every effort to deliver your notifications, and to deliver them with the best user experience:

  • APNs manages an accredited, encrypted, and persistent IP connection to the user’s device.

  • APNs can store notifications for a device that’s currently offline. APNs then forwards the stored notifications when the device comes online.

  • If APNs doesn’t deliver a notification immediately, either for device power considerations or because the destination is offline, it may coalesce notifications for the same bundle ID.

Topics

Server tasks

Security

Device push notifications

Broadcast push notifications

Troubleshooting

See Also

Remote notifications