Respond to push notifications related to your app’s complications, file providers, and VoIP services.
- iOS 8.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- watchOS 6.0+
The PushKit framework supports specialized notifications for updating your watchOS complications, responding to file provider changes, and receiving incoming Voice-over-IP (VoIP) calls. PushKit notifications differ from the ones you handle with the UserNotifications framework. Instead of displaying an alert, badging your app’s icon, or playing a sound, PushKit notifications wake up or launch your app and give it time to respond. Both PushKit and UserNotifications use the Apple Push Notification service (APNs) to deliver push notifications to user devices.
To receive PushKit notifications, your app creates a
PKPush object and uses it to configure the notification types it supports. When registration is successful, PushKit delivers a unique data token to your app that contains the identity of the current device and the push type. Forward that token along to the server, and include it in any notifications you send to the user. APNs uses the token to deliver the correct type of notification to the user's device.
For information about how to configure your server to work with APNs, see Setting Up a Remote Notification Server.