Initializes and returns a record zone object with the specified name.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The name of the new zone. Zone names inside a user’s private database are unique, consist of ASCII characters, are no longer than 255 characters, and do not start with an underscore (
_) character. One way to ensure the uniqueness of zone names is to create a string based on a UUID, but you can also use other techniques.
If this parameter is
nilor is an empty string, the method throws an exception.
The new custom zone, or
nil if the zone cannot be created.
Use this method to create a new record zone. The new zone has the name you provide and the zone’s owner is set to the current user. After creating the zone, save it to the server using a
CKModify object or the
save method of the
CKDatabase class. You must save the zone to the server before attempting to save any records to that zone.
Do not use this method to create a
CKRecord object corresponding to a zone that already exists in the database. If the zone exists, fetch it using a
CKFetch object or the
fetch method of the