---
title: "insertCollaborationItemProvider(_:completionHandler:)"
framework: Message UI
role: symbol
role_heading: Instance Method
platforms: [iOS 18.4+, iPadOS 18.4+, Mac Catalyst 18.4+, visionOS 2.4+]
path: "messageui/mfmailcomposeviewcontroller/insertcollaborationitemprovider(_:completionhandler:)"
---

# insertCollaborationItemProvider(_:completionHandler:)

## Declaration

```swift
func insertCollaborationItemProvider(_ itemProvider: NSItemProvider, completionHandler: @escaping (Bool) -> Void)
```

```swift
func insertCollaborationItemProvider(_ itemProvider: NSItemProvider) async -> Bool
```

## Parameters

- `itemProvider`: Specifying the intended content for collaboration

## Discussion

Discussion Returns YES if the item provider was added to the composition successfully. If the return value is YES, the itemProvider was added to the composition.  The itemProvider must be non-nil.
