<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macOS: 11.3.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderReplicatedExtension/pendingItemsDidChange(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFileProviderReplicatedExtension(im)pendingItemsDidChangeWithCompletionHandler:"
  },
  "title" : "pendingItemsDidChange(completionHandler:)"
}
-->

# pendingItemsDidChange(completionHandler:)

Tells the file provider extension that the set of pending items has changed.

```
optional func pendingItemsDidChange(completionHandler: @escaping @Sendable () -> Void)
```

## Parameters

`completionHandler`

A block that you call after you finish processing the changes.

## Discussion

> Important:
> You can implement this method as a synchronous method that takes a completion handler, as shown on this page, or as an asynchronous method that has the following declaration:
> 
> ```swift
> optional func pendingItemsDidChange() async
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

The system calls this method whenever the set of pending items changes. It updates the pending set regularly, but only when there are meaningful changes, such as:

- New items are now pending.
- The system has successfully synced one or more pending items.
- The domain version changed when the pending item set wasn’t empty.

To enumerate the pending set, create an object that adopts the [`NSFileProviderEnumerationObserver`](/documentation/FileProvider/NSFileProviderEnumerationObserver) and [`NSFileProviderChangeObserver`](/documentation/FileProvider/NSFileProviderChangeObserver) protocols. Then pass this item to the [`enumeratorForPendingItems()`](/documentation/FileProvider/NSFileProviderManager/enumeratorForPendingItems()) method on a [`NSFileProviderManager`](/documentation/FileProvider/NSFileProviderManager) instance for your domain. The system then calls your observer object’s methods when the pending set changes.

> Tip:
> Calls to the observer object may not happen immediately. Don’t use the pending set to detect changes.

---

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)