<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPasteboard/setItemProviders(_:localOnly:expirationDate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPasteboard(im)setItemProviders:localOnly:expirationDate:"
  },
  "title" : "setItemProviders(_:localOnly:expirationDate:)"
}
-->

# setItemProviders(_:localOnly:expirationDate:)

Sets and configures an explicit array of item providers for the pasteboard.

```
func setItemProviders(_ itemProviders: [NSItemProvider], localOnly: Bool, expirationDate: Date?)
```

## Parameters

`itemProviders`

An array of item providers for the pasteboard.

`localOnly`

If <doc://com.apple.documentation/documentation/Swift/false>, the pasteboard items are available to other devices through the Handoff feature; if <doc://com.apple.documentation/documentation/Swift/true>, the pasteboard items are only available to the local device.

`expirationDate`

An <doc://com.apple.documentation/documentation/Foundation/NSDate> value that specifies the time and date that you want the system to remove the pasteboard items from the pasteboard.

---

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)