Instance Property

savePolicy

The policy to apply when the server contains a newer version of a specific record.

Declaration

var savePolicy: CKRecordSavePolicy { get set }

Discussion

Each record has a change tag that allows the server to track when that record was saved. When you save a record, CloudKit compares the change tag in your local copy of the record with the one on the server. If the two tags do not match—meaning that there is a potential conflict—the server uses the value in this property to determine how to proceed.

The default value of this property is ifServerRecordUnchanged. If you intend to change the value of this property, do so before executing the operation or submitting the operation object to a queue.