<!--
{
  "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/NSFileManagerResumeSyncBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSFileManagerResumeSyncBehavior"
  },
  "title" : "NSFileManagerResumeSyncBehavior"
}
-->

# NSFileManagerResumeSyncBehavior

The behaviors the file manager can apply to resolve conflicts when resuming a sync.

```
enum NSFileManagerResumeSyncBehavior
```

## Overview

You use this type when calling [`resumeSyncForUbiquitousItem(at:with:completionHandler:)`](/documentation/Foundation/FileManager/resumeSyncForUbiquitousItem(at:with:completionHandler:)) to resume synchronizing.
In most situations, the [`NSFileManagerResumeSyncBehavior.preserveLocalChanges`](/documentation/Foundation/NSFileManagerResumeSyncBehavior/preserveLocalChanges) behavior is the best choice to avoid risk of data loss.

## Topics

### Identifying sync behaviors

[`NSFileManagerResumeSyncBehaviorPreserveLocalChanges`](/documentation/Foundation/NSFileManagerResumeSyncBehavior/preserveLocalChanges)

Resumes synchronizing by uploading the local version of the file.

[`NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict`](/documentation/Foundation/NSFileManagerResumeSyncBehavior/afterUploadWithFailOnConflict)

Resumes sync by first uploading the local version of the file, failing if the provider detects a conflict.

[`NSFileManagerResumeSyncBehaviorDropLocalChanges`](/documentation/Foundation/NSFileManagerResumeSyncBehavior/dropLocalChanges)

Resumes synchronizing by overwriting any local changes with the remote version of the file.

### Working with raw values

[`init(rawValue:)`](/documentation/Foundation/NSFileManagerResumeSyncBehavior/init(rawValue:))

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)