<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSItemProviderReading/object(withItemProviderData:typeIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSItemProviderReading(cm)objectWithItemProviderData:typeIdentifier:error:"
  },
  "title" : "object(withItemProviderData:typeIdentifier:)"
}
-->

# object(withItemProviderData:typeIdentifier:)

Creates a new instance of a class using the given data and UTI string.

```
static func object(withItemProviderData data: Data, typeIdentifier: String) throws -> Self
```

## Parameters

`data`

The data used to create the object.

`typeIdentifier`

The uniform type identifier (UTI) representing the data type of `data`.

## Return Value

An object created from the given data.

---

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)