---
title: "waitForChanges(below:completionHandler:)"
framework: fileprovider
role: symbol
role_heading: Instance Method
path: "fileprovider/nsfileprovidermanager/waitforchanges(below:completionhandler:)"
---

# waitForChanges(below:completionHandler:)

Requests a notification after the system completes all the specified changes.

## Declaration

```swift
func waitForChanges(below itemIdentifier: NSFileProviderItemIdentifier, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func waitForChanges(below itemIdentifier: NSFileProviderItemIdentifier) async throws
```

## Parameters

- `itemIdentifier`: The item’s identifier.
- `completionHandler`: A block that the system calls after all the changes are complete. The block takes the following parameters:

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func waitForChanges(below itemIdentifier: NSFileProviderItemIdentifier) async throws For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously. This method waits for all the changes to the item’s descendants to complete before calling the completion handler. If an error occurs during this process, the system immediately passes the error to the completion handler, and you can’t assume all the changes have completed. note: The system doesn’t wait for changes to the item specified by the itemIdentifier parameter. It only waits for changes to the item’s children. As a result, you can use this method inside a call to modifyItem(_:baseVersion:changedFields:contents:options:request:completionHandler:). If the itemIdentifier property doesn’t refer to a directory, this method immediately calls the completion handler.

## See Also

### Performing actions

- [placeholderURL(for:)](fileprovider/nsfileprovidermanager/placeholderurl(for:).md)
- [writePlaceholder(at:withMetadata:)](fileprovider/nsfileprovidermanager/writeplaceholder(at:withmetadata:).md)
- [register(_:forItemWithIdentifier:completionHandler:)](fileprovider/nsfileprovidermanager/register(_:foritemwithidentifier:completionhandler:).md)
- [signalEnumerator(for:completionHandler:)](fileprovider/nsfileprovidermanager/signalenumerator(for:completionhandler:).md)
- [globalProgress(for:)](fileprovider/nsfileprovidermanager/globalprogress(for:).md)
