An error indicating that the record was rejected because the version on the server is different.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
This error indicates that the server's version of the record is newer than the version the client tried to save. Your app is expected to handle this error, resolve any conflicts in the record, and attempt another save of the record, if needed.
CloudKit provides your app with three copies of the record in this error's
user dictionary to assist with comparing and merging the changes:
CKRecord: A copy of the record the client attempted to save
Changed Error Client Record Key
CKRecord: A copy of the record as it currently exists on the server
Changed Error Server Record Key
CKRecord: A copy of the client record without any of the pending changes the client just attempted to save
Changed Error Ancestor Record Key
When a conflict occurs, your app should merge all changes onto the record under the
CKRecord key and attempt a new save using that record. Merging onto either of the other two copies of the record results in another conflict error because those records have the old record change tag.