Type Method

default()

Returns the default zone for records.

Declaration

class func `default`() -> CKRecordZone

Return Value

The default record zone for a database.

Discussion

Always use this method to retrieve the default zone for a database. The returned object can be used to specify the default zone for either the public or private database of a container. You do not need to save the returned zone object before using it. The owner of the zone is set to CKOwnerDefaultName, which corresponds to the current user.

The default zone of a database is a convenient place to store and access records. Whenever you do not explicitly assign a zone to a record, CloudKit puts the record in the default zone.

The disadvantage of using the default zone for storing records is that it does not have any special capabilities. You cannot save a group of records to iCloud atomically in the default zone. Similarly, you cannot use a CKFetchRecordChangesOperation object on records in the default zone.

See Also