---
title: "loadData(withTypeIdentifier:forItemProviderCompletionHandler:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsitemproviderwriting/loaddata(withtypeidentifier:foritemprovidercompletionhandler:)"
---

# loadData(withTypeIdentifier:forItemProviderCompletionHandler:)

Loads data of a particular type, identified by the given UTI.

## Declaration

```swift
func loadData(withTypeIdentifier typeIdentifier: String, forItemProviderCompletionHandler completionHandler: @escaping @Sendable (Data?, (any Error)?) -> Void) -> Progress?
```

## Parameters

- `typeIdentifier`: The uniform type identifier (UTI) identifying the type of data to load.
- `completionHandler`: The handler that’s called after the data is loaded.

## Return Value

Return Value The progress of the data load process.

## Discussion

Discussion When the system calls this method, the typeIdentifier parameter is set to one of the elements in the writableTypeIdentifiersForItemProvider array.
