---
title: "startProvidingItem(at:completionHandler:)"
framework: fileprovider
role: symbol
role_heading: Instance Method
path: "fileprovider/nsfileproviderextension/startprovidingitem(at:completionhandler:)"
---

# startProvidingItem(at:completionHandler:)

Provides an actual file on disk for a placeholder.

## Declaration

```swift
func startProvidingItem(at url: URL, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func startProvidingItem(at url: URL) async throws
```

## Parameters

- `url`: The URL of a shared document.
- `completionHandler`: A block to be called as soon as the file is available. The completion handler takes the following parameter:

## 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 startProvidingItem(at url: URL) async throws For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously. This method is called whenever another process tries to access a placeholder for a shared document. Override this method to download, create, or otherwise provide the file. As soon as the file is available, call the provided completion handler. If any errors occur during this process, pass the error to the completion handler. The system then passes the error back to the original coordinated read or write. You must override this method. Do not call super in your implementations. note: Do not use file coordination inside this method. The system already guarantees that no other process can access the file while this method is executing.

## See Also

### Managing shared files

- [itemChanged(at:)](fileprovider/nsfileproviderextension/itemchanged(at:).md)
- [providePlaceholder(at:completionHandler:)](fileprovider/nsfileproviderextension/provideplaceholder(at:completionhandler:).md)
- [stopProvidingItem(at:)](fileprovider/nsfileproviderextension/stopprovidingitem(at:).md)
