Instance Property

parent

A reference to the parent record to this record.

Declaration

@property(nonatomic, copy) CKReference *parent;

Discussion

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

share

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.