<!--
{
  "availability" : [
    "iOS: 8.0.0 - 27.0.0",
    "iPadOS: 8.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.10.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0",
    "watchOS: 2.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSItemProvider/init(item:typeIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSItemProvider(im)initWithItem:typeIdentifier:"
  },
  "title" : "init(item:typeIdentifier:)"
}
-->

# init(item:typeIdentifier:)

Creates an item provider with an object, according to the item provider type coercion policy.

```
init(item: (any NSSecureCoding)?, typeIdentifier: String?)
```

## Parameters

`item`

An object containing the data you want to provide. You may specify `nil` for this parameter and register items and types later.

`typeIdentifier`

A string that represents the UTI of the item. If `item` is not `nil`, this parameter must not be `nil`.

## Return Value

An item provider for the specified item.

## Discussion

Use this method to initialize an item provider for objects in your app. The item provider registers your object with the specified type. Subsequent requests for that same type return the specified `item`.

---

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)