<!--
{
  "documentType" : "article",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/record-changed-error-keys",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Record Changed Error Keys"
}
-->

# Record Changed Error Keys

Constants that represent conflicting records in a save operation.

## Discussion

If the version of a record on the server is newer than the version you try to save, the server returns a [`CKError.Code.serverRecordChanged`](/documentation/CloudKit/CKError/Code/serverRecordChanged) error. The error’s <doc://com.apple.documentation/documentation/Foundation/NSError/userInfo> dictionary contains the different versions of the conflicting records. Use these keys to retrieve the records, and to perform any resolution logic necessary to resolve the conflict.

## Topics

### Record Changed Error Keys

[`CKRecordChangedErrorAncestorRecordKey`](/documentation/CloudKit/CKRecordChangedErrorAncestorRecordKey)

The key to retrieve the original version of the record.

[`CKRecordChangedErrorClientRecordKey`](/documentation/CloudKit/CKRecordChangedErrorClientRecordKey)

The key to retrieve the local version of the record.

[`CKRecordChangedErrorServerRecordKey`](/documentation/CloudKit/CKRecordChangedErrorServerRecordKey)

The key to retrieve the server’s version of the record.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)