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


@interface PKPushRegistry : NSObject


A PKPushRegistry object manages only certain types of notifications, such as high-priority notifications needed by a VoIP app. PushKit wakes up your app as needed to deliver incoming notifications and delivers the notifications directly to the push registry object that requested them.

Every time your app launches, whether in the foreground or in the background, create a push registry object and configure it. Typically, you keep the push registry object running for the duration of your app. Each push registry object delivers incoming notifications to its delegate object, which also handles the responses for registration requests. Listing 1 shows how to create a push registry object and request VoIP notifications. Always assign an appropriate delegate object before modifying the desiredPushTypes property.

Listing 1

Creating and configuring a push registry object

- (void) registerForVoIPPushes {
   self.voipRegistry = [[PKPushRegistry alloc] initWithQueue:nil];
   self.voipRegistry.delegate = self;
   // Initiate registration.
   self.voipRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];

Assigning a new value to the desiredPushTypes property registers the push registry object with the PushKit servers. The server reports the success or failure of your registration attempts asynchronously to the push registry, which then reports those results to its delegate object. The push registry also delivers all received notifications to the delegate object. For more information about the delegate methods, see PKPushRegistryDelegate.


Initializing a Push Registry

- initWithQueue:

Creates a push registry with the specified dispatch queue.

Receiving the Notification Data


The delegate object that receives notifications coming from the push registry object.


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

Managing the Push Registry


Registers the push types for this push registry object.

- pushTokenForType:

Retrieves the locally cached push token for the specified push type.


Inherits From

See Also


Supporting PushKit Notifications in Your App

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


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


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