<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderModifyItemOptions/failOnConflict",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:@E@NSFileProviderModifyItemOptions@NSFileProviderModifyItemFailOnConflict"
  },
  "title" : "failOnConflict"
}
-->

# failOnConflict

An option to fail an upload in the event of a version conflict.

```
static var failOnConflict: NSFileProviderModifyItemOptions { get }
```

## Discussion

If you adopt this option, and an uploaded item’s base version doesn’t match the version on the server, fail and return [`localVersionConflictingWithServer`](/documentation/FileProvider/NSFileProviderError/localVersionConflictingWithServer) (Swift) or [`NSFileProviderError.Code.localVersionConflictingWithServer`](/documentation/FileProvider/NSFileProviderError/Code/localVersionConflictingWithServer) (Objective-C) in your implementation of `modifyItem`.

To support the fail-on-conflict behavior in your file provider, indicate the support by adding the following key/value pair to the extension’s Info pane.

```
<key>NSExtension</key>
<dict>
    <key>NSExtensionFileProviderSupportsFailingUploadOnConflict</key>
    <true/>
</dict>
```

---

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)