<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCloudSharingConflictError-swift.var",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So27NSCloudSharingConflictErrorSivp"
  },
  "title" : "NSCloudSharingConflictError"
}
-->

# NSCloudSharingConflictError

A conflict occurred during an attempt to save changes.

```
var NSCloudSharingConflictError: Int { get }
```

## Discussion

This error occurs when a conflict is detected while trying to save changes to the <doc://com.apple.documentation/documentation/CloudKit/CKShare> or root <doc://com.apple.documentation/documentation/CloudKit/CKRecord>. Respond to this error by first fetching the server’s changes to the records, then either handle the conflict manually or present it, which will instruct the user to try the operation again.

---

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)