Framework

PushKit

Respond to push notifications related to your app’s complications, file providers, and VoIP services.

Overview

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

Topics

Registration

Supporting PushKit Notifications in Your App

Declare the types of PushKit notifications your app supports and configure objects to respond to them.

class PKPushRegistry

An object that requests the delivery and handles the receipt of PushKit notifications.

protocol PKPushRegistryDelegate

The methods that you use to handle incoming PushKit notifications and registration events.

class PKPushCredentials

An object that encapsulates the device token you use to deliver push notifications to your app.

Push Types

Responding to VoIP Notifications from PushKit

Receive incoming Voice-over-IP (VoIP) push notifications and use them to display the system call interface to the user.

struct PKPushType

Constants reflecting the push types you want to support.

Payload

class PKPushPayload

An object that contains information about a received PushKit notification.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software