Class

CKNotification

The abstract base class for CloudKit notifications.

Declaration

@interface CKNotification : NSObject

Overview

Notification objects wrap the data associated with a push notification. Use notification objects to wrap recently received push notification data or to fetch notification objects representing already delivered push notifications from a container. In both cases, the information in the notification object tells you what changed.

The CKNotification class itself is an abstract class. When you create a new notification object from a payload dictionary, the notificationFromRemoteNotificationDictionary: method instantiates a subclass of the appropriate type. Similarly, when you fetch notifications from a container, what you receive are instances of a concrete subclass. The base CKNotification class provides information about the push notification and how it was delivered. Specific subclasses contain specific data indicating what change actually occurred.

Topics

Creating a Notification Object

+ notificationFromRemoteNotificationDictionary:

Creates and returns a new notification object using the specified payload data.

Identifying the Notification Object

notificationID

The ID of the notification.

notificationType

The type of event that generated the notification.

containerIdentifier

The ID of the container whose content triggered the notification.

Getting the Notification Status

isPruned

A Boolean value indicating whether some push notification content was removed prior to delivery.

Accessing the Notification Info

alertBody

The text of the alert message.

alertLocalizationKey

The key that identifies the localized string to use for the alert message.

alertLocalizationArgs

The array of fields used to build the alert message

alertActionLocalizationKey

The key that identifies the text to use for the action button in the alert panel.

alertLaunchImage

The filename of the launch image displayed when your app is launched from the push notification alert.

soundName

The name of the sound file to play when a notification arrives.

badge

The current badge value.

category

Name of the action group corresponding to this notification.

subscriptionID

The identifier of the subscription that caused this notification to fire.

Constants

CKNotificationType

Constants indicating the type of event that generated the push notification.

Relationships

Inherits From

See Also

Notifications

CKQueryNotification

An object that represents a push notification that was generated by a subscription object.

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