Record Changed Error Keys

Constants related to a record-changed error.


If the version of a record on the server is newer than the version you tried to save, the server returns a CKError.Code.serverRecordChanged error. The userInfo dictionary of the error object contains the different versions of the conflicting records. Use these keys to retrieve the records and to perform whatever resolution logic is needed to resolve the conflict.



let CKPartialErrorsByItemIDKey: String

The key you use to retrieve partial error results. The value of this key is an NSDictionary object that maps an item ID object to an error object. The type of each item ID object is dependent on where the partial error occurs. For example, if you receive a partial error when modifying CKRecord objects, each key is a CKRecord.ID object corresponding to a record that was not modified.

let CKErrorRetryAfterKey: String

The value of this key is an NSNumber object containing the number of seconds after which you may retry a request. This key may be included in the userInfo dictionary of an error object when the type of the error is CKError.Code.serviceUnavailable or CKError.Code.requestRateLimited.

let CKRecordChangedErrorAncestorRecordKey: String

A key whose value is the original CKRecord object that you used as the basis for making your changes.

let CKRecordChangedErrorServerRecordKey: String

A key whose value is the CKRecord object that was found on the server.

let CKRecordChangedErrorClientRecordKey: String

A key whose value is the CKRecord object that you tried to save. This record is based on the record in the CKRecordChangedErrorAncestorRecordKey key but contains the additional changes you made.