---
title: "setItemProviders(_:localOnly:expirationDate:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipasteboard/setitemproviders(_:localonly:expirationdate:)"
---

# setItemProviders(_:localOnly:expirationDate:)

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

## Declaration

```swift
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.

## See Also

### Getting and setting item providers

- [itemProviders](uikit/uipasteboard/itemproviders.md)
- [setObjects(_:)](uikit/uipasteboard/setobjects(_:)-lljo.md)
- [setObjects(_:)](uikit/uipasteboard/setobjects(_:)-fjg8.md)
- [setObjects(_:localOnly:expirationDate:)](uikit/uipasteboard/setobjects(_:localonly:expirationdate:)-3h3iz.md)
- [setObjects(_:localOnly:expirationDate:)](uikit/uipasteboard/setobjects(_:localonly:expirationdate:)-26u8o.md)
