What is APNs (Apple Push Notification service)?
APNs, the Apple Push Notification service, is Apple's cloud service that delivers push notifications from a provider server to Apple devices like iPhone, iPad, and Mac. It is the channel every iOS push notification travels through, whether you send it from your own server or through a third-party push service.
How APNs works
The flow has a few steps. First the app asks the user for notification permission and registers with APNs, which returns a unique device token that identifies this app on this device. The app sends that token to your server and stores it. When you want to notify the user, your server sends a request to APNs containing the token and a payload, the message and any options, over a secure connection authenticated with a key or certificate from your developer account. APNs then delivers the notification to the device, waking the app if needed, even when it is not currently running. Because Apple operates the service, all iOS push traffic ultimately passes through APNs.
What you need to send push notifications
Sending push requires a few pieces. You need an Apple Developer account, the push notifications capability and entitlement enabled for your app, and an APNs authentication key or certificate so your server can prove who it is. You also need a server, since a device cannot send a push to itself; notifications always originate from a provider. Many teams do not build that provider from scratch and instead use a service such as OneSignal or Firebase Cloud Messaging, which manage device tokens and send through APNs on your behalf, adding scheduling, segmentation, and analytics.
Push notifications, entitlements, and AppFlight
Push notifications depend on the right capability and entitlement being set on the app, plus user permission at runtime, and Apple expects notifications to be relevant rather than spammy under its guidelines. AppFlight builds native Swift and SwiftUI apps, the kind of project where adding push means enabling the capability, registering for a device token, and sending through APNs from a server or a push provider. The notification content and permission prompt are still reviewed as part of the app like anything else.
FAQ
How does APNs work end to end?
The app asks the user for permission and registers with APNs, which returns a device token. The app sends that token to your server. To notify the user, your server sends a request to APNs with the token and payload, and APNs delivers it to the device, even when the app is not running.
Do I need a server to send push notifications?
Yes. You need a provider that talks to APNs, either your own server or a service like OneSignal or Firebase Cloud Messaging that sends through APNs for you. The device cannot push to itself; notifications originate from a server.
Is APNs free?
APNs itself is provided by Apple as part of the developer program at no separate charge. You need an Apple Developer account and the push notifications capability enabled. Third-party push services may add their own pricing on top.