Class

CKRecordZoneNotification

A notification that is triggered by changes to the contents of a record zone.

Overview

Zone-related changes occur when existing records in the zone are modified, when new records are added, and when existing records are deleted. Use instances of this class to determine which zone triggered the notification.

You do not create instances of this class directly. When your app receives a push notification, call the init(fromRemoteNotificationDictionary:) method of CKNotification to generate a notification object of the appropriate type. You can also fetch previously delivered notifications from a container using a CKFetchNotificationChangesOperation object. If the notification was triggered due to a record zone change, the operation object delivers an instance of CKRecordZoneNotification with its notificationType property set to CKNotification.NotificationType.recordZone. Use the record zone notification object to get the record zone information and other push-related data.

If a push notification’s payload is too large, pieces of data may be dropped until the payload meets the allowed size limit. The data that alerts the user is the most important and is dropped last. Data values in this class are among the first to be dropped, with values being dropped in the following order:

  1. containerIdentifier—defined in the CKNotification class.

  2. recordZoneID

  3. Other properties of the CKNotification class.

Topics

Getting the Record Zone ID

var recordZoneID: CKRecordZone.ID?

The ID of the zone that changed.

Getting the Database Scope

var databaseScope: CKDatabase.Scope

The type of database (public, private, or shared) associated with the zone.

Relationships

Inherits From

Conforms To

See Also

Notifications and Subscriptions

class CKQuerySubscription

The abstract base class for CloudKit subscriptions.

class CKDatabaseNotification

A notification that is triggered by changes to the contents of a database.

Notifications

Notifications are used to inform your application of changes made by another device.

Subscription Operations

Subscriptions are used to request notifications of specific subsets of data changes.