Initializes and returns a subscription object that monitors all records in the specified record zone.


init(zoneID: CKRecordZone.ID, options subscriptionOptions: CKSubscriptionOptions = [])



The ID of the record zone containing the records you want to monitor. This parameter must not be nil.


The configuration options for the subscription. You must specify 0 for this parameter. Zone subscriptions currently do not support any options.

Return Value

A subscription object initialized to track changes to the contents of a record zone.


The object returned by this method is configured as a zone-based subscription, which generates a push notification when any changes are made to the records in the specified zone.

See Also

Initializing a Zone-Based Subscription

init(zoneID: CKRecordZone.ID, subscriptionID: String, options: CKSubscriptionOptions)

Initializes and returns a subscription object that monitors the specified zone and has a custom name that you provide.


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