<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentInteractionControllerDelegate/documentInteractionController(_:willBeginSendingToApplication:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIDocumentInteractionControllerDelegate(im)documentInteractionController:willBeginSendingToApplication:"
  },
  "title" : "documentInteractionController(_:willBeginSendingToApplication:)"
}
-->

# documentInteractionController(_:willBeginSendingToApplication:)

Called when a document interaction controller’s document is about to be opened by the specified application.

```
optional func documentInteractionController(_ controller: UIDocumentInteractionController, willBeginSendingToApplication application: String?)
```

## Parameters

`controller`

The document interaction controller whose document is about to be opened.

`application`

The bundle identifier of the application that is about to open the document. This value corresponds to the value in the `CFBundleIdentifier` key of the application’s `Info.plist` file.

## Discussion

This method is called when the user chooses to open a document, which could occur from within a document preview. When a document is passed to another application, the contents of the document interaction controller’s [`annotation`](/documentation/UIKit/UIDocumentInteractionController/annotation) property are passed with it. You can use this method to configure the contents of that property or prepare your own application for handing off the document.

---

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)