<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSFileManagerUploadLocalVersionConflictPolicy/conflictPolicyFailOnConflict",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSFileManagerUploadLocalVersionConflictPolicy@NSFileManagerUploadConflictPolicyFailOnConflict"
  },
  "title" : "NSFileManagerUploadLocalVersionConflictPolicy.conflictPolicyFailOnConflict"
}
-->

# NSFileManagerUploadLocalVersionConflictPolicy.conflictPolicyFailOnConflict

Resolves the conflict by causing the upload to fail.

```
case conflictPolicyFailOnConflict
```

## Discussion

This policy causes an upload to fail if the local version of a file, with any local changes applied, doesn’t match the server version.
In this scenario, call [`fetchLatestRemoteVersionOfItem(at:completionHandler:)`](/documentation/Foundation/FileManager/fetchLatestRemoteVersionOfItem(at:completionHandler:)), rebase local changes on top of the newly fetched version, and retry the upload.

This policy is only available on paused items for which the file provider supports the fail-on-conflict behavior.
To check that the file provider supports the behavior, get the [`ubiquitousItemSupportedSyncControlsKey`](/documentation/Foundation/URLResourceKey/ubiquitousItemSupportedSyncControlsKey) URL resource and verify that [`failUploadOnConflict`](/documentation/Foundation/NSFileManagerSupportedSyncControls/failUploadOnConflict) is `true`.

---

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)