The unique ID of the record.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The ID of a new record is always set at initialization time. If you use the
init method to initialize the record, the ID is derived from the
CKRecord 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
CKRecord, which is the default. For other save policies, the server overwrites the contents of the existing record accordingly.