init(recordName:zoneID:)
Creates a new record ID with the specified name and zone information.
Declaration
convenience init(recordName: String = UUID().uuidString, zoneID: CKRecordZone.ID = CKRecordZone.ID.default)Parameters
- recordName:
The name that identifies the record. The string must contain only ASCII characters, must not exceed 255 characters, and must not start with an underscore. If you specify an empty string for this parameter, the method throws an exception.
- zoneID:
The ID of the record zone where you want to store the record. This parameter must not be
nil.
Discussion
Use this method when you create or search for records in a zone other than the default zone. The value in the zoneID parameter must represent a zone that already exists in the database. If the record zone doesn’t exist, save the corresponding CKRecordZone object to the database before attempting to save any CKRecord objects in that zone.