Initializer

init(zoneID:)

Initializes and returns a record zone object using the specified ID.

Declaration

init(zoneID: CKRecordZone.ID)

Parameters

zoneID

The ID for the new zone. This parameter must not be nil.

Return Value

The new custom zone, or nil if the zone cannot be created.

Discussion

Use this method when you want to create a new record zone based on the information in a zone ID. After creating the zone, save it to the server using a CKModifyRecordZonesOperation object or the save(_:completionHandler:) method of the CKDatabase class.

Do not use this method to create a CKRecordZone object corresponding to a zone that already exists in the database. If the zone exists, fetch it using a CKFetchRecordZonesOperation object or the fetch(withRecordZoneID:completionHandler:) method of the CKDatabase class.

See Also

Initializing a Record Zone

init(zoneName: String)

Initializes and returns a record zone object with the specified name.