<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderSyncAnchor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:@T@NSFileProviderSyncAnchor"
  },
  "title" : "NSFileProviderSyncAnchor"
}
-->

# NSFileProviderSyncAnchor

A synchronization point that represents the last batch of changes returned by the enumerator.

```
struct NSFileProviderSyncAnchor
```

## Discussion

Your file provider should populate the sync anchor with the information it needs to identify and enumerate only the changes that occurred after the synchronization point. For example, a simple sync anchor could use the time and date of the last update successfully downloaded from the server. A request to enumerate changes from that sync anchor would then return only the changes downloaded after that date.

The system only retains the last anchor passed to it. After the system calls [`enumerateChanges(for:from:)`](/documentation/FileProvider/NSFileProviderEnumerator/enumerateChanges(for:from:)) with a sync anchor, it’s safe to deallocate any older sync anchors.

## Topics

### Creating Sync Anchors

[`init(_:)`](/documentation/FileProvider/NSFileProviderSyncAnchor/init(_:))

Returns a new sync anchor.

[`init(rawValue:)`](/documentation/FileProvider/NSFileProviderSyncAnchor/init(rawValue:))

Returns a new sync anchor from the provided data object.

## Relationships

### Conforms To

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

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

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

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

[`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)