<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKError/ancestorRecord",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:SC11CKErrorCodeLeV8CloudKitE14ancestorRecordSo8CKRecordCSgvp"
  },
  "title" : "ancestorRecord"
}
-->

# ancestorRecord

The original version of the record.

```
var ancestorRecord: CKRecord? { get }
```

## Discussion

This property’s value is available only when the error’s `code` is [`serverRecordChanged`](/documentation/CloudKit/CKError/serverRecordChanged), which indicates the server’s record is newer than the version you try to save. Use this property’s value, along with those of [`clientRecord`](/documentation/CloudKit/CKError/clientRecord) and [`serverRecord`](/documentation/CloudKit/CKError/serverRecord), to resolve the conflict.

The error’s `userInfo` dictionary contains the same value as this property. You can access it using the [`CKRecordChangedErrorAncestorRecordKey`](/documentation/CloudKit/CKRecordChangedErrorAncestorRecordKey) key.

---

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)