<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/importsItemProviders(_:onImport:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE20importsItemProviders_8onImportQrSay22UniformTypeIdentifiers6UTTypeVG_SbSaySo14NSItemProviderCGctF"
  },
  "title" : "importsItemProviders(_:onImport:)"
}
-->

# importsItemProviders(_:onImport:)

Enables importing item providers from services, such as Continuity Camera
on macOS.

```
nonisolated func importsItemProviders(_ contentTypes: [UTType], onImport: @escaping ([NSItemProvider]) -> Bool) -> some View
```

## Parameters

`contentTypes`

The types of content that the view supports importing.
An empty array means the view does not currently support importing.

`onImport`

A closure that will be called with the imported service
item. Return `false` to indicate that there was a failure to receive
the items.

---

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)