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

# materializedItemsDidChange(completionHandler:)

Tells the file provider that the set of materialized items changed.

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

## Parameters

`completionHandler`

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

## 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:
> 
> ```swift
> optional func materializedItemsDidChange() 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 when the set of materialized items changes, such as when the system downloads the content of a dataless item, or deletes the contents of a materialized item.

> Note:
> The system doesn’t call this method when the item’s content changes.

Keep track of the items in the working set—the set of items that the system has downloaded and is managing on disk—to optimize updates. Your file provider must let the system know about any changes to the working set. If you don’t track the working set, then you need to let the system know about any changes to any items in the remote storage.

For more information, see [Synchronizing the File Provider Extension](/documentation/FileProvider/synchronizing-the-file-provider-extension).

---

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)