Contents

pendingItemsDidChange(completionHandler:)

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

Declaration

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

Parameters

  • completionHandler:

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

Discussion

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 and NSFileProviderChangeObserver protocols. Then pass this item to the enumeratorForPendingItems() method on a NSFileProviderManager instance for your domain. The system then calls your observer object’s methods when the pending set changes.