init(item:typeIdentifier:)
Creates an item provider with an object, according to the item provider type coercion policy.
Declaration
init(item: (any NSSecureCoding)?, typeIdentifier: String?)Parameters
- item:
An object containing the data you want to provide. You may specify
nilfor this parameter and register items and types later. - typeIdentifier:
A string that represents the UTI of the item. If
itemis notnil, this parameter must not benil.
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.