<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BEDragInteractionDelegate/dragInteraction(_:prepare:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BEDragInteractionDelegate(im)dragInteraction:prepareDragSession:completion:"
  },
  "title" : "dragInteraction(_:prepare:completion:)"
}
-->

# dragInteraction(_:prepare:completion:)

Prepares the delegate for a drag session.

```
optional func dragInteraction(_ dragInteraction: BEDragInteraction, prepare session: any UIDragSession, completion: @escaping () -> Bool)
```

## Parameters

`dragInteraction`

The drag interaction that invokes this method.

`session`

The drag session for which to prepare.

`completion`

A completion handler you call after finishing drag session preparations.

## Discussion

Call the completion handler when your app finishes preparing for the drag session. Call the handler as soon as possible to maintain a responsive interaction experience.

> Important:
> The system expects your app to call the completion handler right away after drag session preparation, otherwise the system cancels the drag interaction.

Pass `true` in the completion handler to indicate successful preparations; otherwise, pass `false`.

---

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)