An object that specifies the push notification data that the server sends to your app when a subscription finds a match.


class NotificationInfo : NSObject


When configuring a CKSubscription object, create one of these objects and use it to specify the type of push notifications you want generated when the subscription’s trigger condition is met. You can provide a message for an alert panel, information about the sounds to play, and information about whether the app should be badged. You can also ask the server to provide information about the record that triggered the notification.

When you receive a push notification generated by a subscription, use the init(fromRemoteNotificationDictionary:) method of CKNotification to create a notification object from the payload data. That object contains the data you specified using this class when configuring the subscription.

For more information about push notification alerts and how they are displayed to the user, see Apple Push Notification Service in Local and Remote Notification Programming Guide.


Accessing the Notification Info

var alertBody: String?

The text to use for the alert message.

var alertLocalizationKey: String?

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

var alertActionLocalizationKey: String?

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

var alertLaunchImage: String?

The filename of an image to use as a launch image.

var category: String?

Name of the action group corresponding to this notification.

var soundName: String?

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

var shouldBadge: Bool

A Boolean setting that controls whether a badge value should be incremented.

var shouldSendContentAvailable: Bool

A Boolean value indicating whether the push notification should include the content-available flag.


Inherits From

See Also

Notification Information

class CKNotification.ID

An object that uniquely identifies a push notification sent from a container.