---
title: "exportsItemProviders(_:onExport:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/exportsitemproviders(_:onexport:)"
---

# exportsItemProviders(_:onExport:)

Exports a read-only item provider for consumption by shortcuts, quick actions, and services.

## Declaration

```swift
nonisolated func exportsItemProviders(_ contentTypes: [UTType], onExport: @escaping () -> [NSItemProvider]) -> some View

```

## Parameters

- `contentTypes`: The types of content that the view supports exporting. An empty array means the view does not currently support exporting.
- `onExport`: A closure that will be called on request of the items by the shortcut or service.

## Discussion

Discussion If the associated view supports selection, the exported item should reflect that selected subpart.

## See Also

### Importing and exporting using item providers

- [importsItemProviders(_:onImport:)](swiftui/view/importsitemproviders(_:onimport:).md)
- [exportsItemProviders(_:onExport:onEdit:)](swiftui/view/exportsitemproviders(_:onexport:onedit:).md)
