---
title: "dragInteraction(_:prepare:completion:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/bedraginteractiondelegate/draginteraction(_:prepare:completion:)"
---

# dragInteraction(_:prepare:completion:)

Prepares the delegate for a drag session.

## Declaration

```swift
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

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.

## See Also

### Participating in drag gestures

- [dragInteraction(_:itemsForAddingTo:forTouchAt:completion:)](browserenginekit/bedraginteractiondelegate/draginteraction(_:itemsforaddingto:fortouchat:completion:).md)
