Instance Property


A reference to the parent record to this record.


@property(nonatomic, copy) CKReference *parent;


A parent reference is used to teach CloudKit about the hierarchy of your records. This hierarchy of records will be shared if the share reference is set on a record.

A parent record reference must have a CKReferenceActionNone set.

The target of a parent reference must exist at save time — either already on the server, or part of the same CKModifyRecordsOperation batch.

You are encouraged to set up the parent relationships as part of normal record saves, even if you are not planning on sharing records at this time. This allows you to share and stop sharing a hierarchy of records at a later date by only modifying the “top level” record, setting or clear its share reference.

See Also

Sharing Records


A reference to the share associated with the sharing of this record.

- setParentReferenceFromRecord:

Creates and sets a reference object for a parent from its record.

- setParentReferenceFromRecordID:

Creates and sets a reference object for a parent from the parent’s record ID.

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