---
title: failOnConflict
framework: fileprovider
role: symbol
role_heading: Type Property
path: fileprovider/nsfileprovidermodifyitemoptions/failonconflict
---

# failOnConflict

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

## Declaration

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

## Discussion

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 (Swift) or 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>

## See Also

### Choosing Modify Item Options

- [mayAlreadyExist](fileprovider/nsfileprovidermodifyitemoptions/mayalreadyexist.md)
