---
title: NSFileManagerUploadLocalVersionConflictPolicy.conflictPolicyFailOnConflict
framework: foundation
role: symbol
role_heading: Case
path: foundation/nsfilemanageruploadlocalversionconflictpolicy/conflictpolicyfailonconflict
---

# NSFileManagerUploadLocalVersionConflictPolicy.conflictPolicyFailOnConflict

Resolves the conflict by causing the upload to fail.

## Declaration

```swift
case conflictPolicyFailOnConflict
```

## Discussion

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:), 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 URL resource and verify that failUploadOnConflict is true.

## See Also

### Working with conflict policies

- [NSFileManagerUploadLocalVersionConflictPolicy.conflictPolicyDefault](foundation/nsfilemanageruploadlocalversionconflictpolicy/conflictpolicydefault.md)
