Instance Property

recordID

The unique ID of the record.

Declaration

@property(nonatomic, readonly, copy) CKRecordID *recordID;

Discussion

The ID of a new record is always set at initialization time. If you use the initWithRecordType:recordID: method to initialize the record, the ID is derived from the CKRecordID object you provide. In all other cases, the record generates a UUID and bases its ID on that value. The ID of a record never changes over the lifetime of that record.

When you save a new record object to the server, the server validates the uniqueness of the record but reports an error only if the save policy calls for it. Specifically, it reports an error when the save policy is set to CKRecordSaveIfServerRecordUnchanged, which is the default. For other save policies, the server overwrites the contents of the existing record accordingly.

See Also

Accessing the Record’s Metadata

recordType

The app-defined string that identifies the type of the record.

creationDate

The time when the record was first saved to the server.

creatorUserRecordID

The ID of the user who created the record.

modificationDate

The time when the record was last saved to the server.

lastModifiedUserRecordID

The ID of the user who last modified the record.

recordChangeTag

A string containing the server change token for the record.

CKRecordID

An object that uniquely identifies a record in a database.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software