initWithRecordType:zoneID:
Creates a record in the specified zone.
Declaration
- (instancetype) initWithRecordType:(CKRecordType) recordType zoneID:(CKRecordZoneID *) zoneID;Parameters
- recordType:
A string that represents the type of record that you want to create. You can’t change the record type after initialization. You define the record types that your app supports and use them to distinguish between records with different types of data. This parameter must not be
nilor contain an empty string.A record type must consist of one or more alphanumeric characters and must start with a letter. CloudKit permits the use of underscores, but not spaces.
- zoneID:
The ID of the record zone where you want to store the record.
Return Value
An initialized record object.
Discussion
Use this method to initialize a new record object in the specified record zone.
Upon creation, the new record contains no data and exists only in memory on the local device. Save the record using a CKModifyRecordsOperation object or by using the save(_:completionHandler:) method of CKDatabase to transfer the record’s contents to the server.