<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:@E@CKRecordSavePolicy@CKRecordSaveIfServerRecordUnchanged"
  },
  "title" : "CKModifyRecordsOperation.RecordSavePolicy.ifServerRecordUnchanged"
}
-->

# CKModifyRecordsOperation.RecordSavePolicy.ifServerRecordUnchanged

A policy that instructs CloudKit to only proceed if the record’s change tag matches that of the server’s copy.

```
case ifServerRecordUnchanged
```

## Discussion

The server maintains a change tag for each record automatically. When you fetch a record, that change tag accompanies the rest of the record’s data. If the change tag in your local record matches the change tag of the record on the server, the save operation proceeds normally. If the server record contains a newer change tag, CloudKit doesn’t save the record and reports a [`CKError.Code.serverRecordChanged`](/documentation/CloudKit/CKError/Code/serverRecordChanged) error.

> Note: A ``doc://com.apple.cloudkit/documentation/CloudKit/CKShare`` record is always saved with policy `ifServerRecordUnchanged`, regardless of an operation’s ``doc://com.apple.cloudkit/documentation/CloudKit/CKModifyRecordsOperation/savePolicy``.

---

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)