One Logo Pool Ball
SwiftUI · IOS API REFERENCE

DragConfiguration.OperationsOutsideApp

struct · iOS 26.0+ · SDK 27.1

struct OperationsOutsideApp

Describes the suggested drag operations to other applications. To create a default configuration, initialize it without parameters. On iOS, the default behavior is to disallow drag outside the application. On macOS—support drag-to-copy to destinations both within the application and to other apps. In addition to `copy`, add `move` operation support by specifying that in the initializer: struct DraggableBookView: View { var id: UUID var body: some View { BookView() .draggable(Book(id: id)) .dragConfiguration(makeConfiguration()) } func makeConfiguration() -> DragConfiguration { let operations = OperationsOutsideApp( allowCopy: true, allowMove: true ) return DragConfiguration(operationsOutsideApp: operations) } } In the example above, an application provides operations that will be suggested to other applications. Drags to destinations within the app will use the default behavior: suggest operation `copy` to drag destinations.

Members (1)

init · iOS 26.0+

init

TypeScript
static init(allowCopy?: boolean): DragConfiguration_OperationsOutsideApp
Swift declaration
init(allowCopy: Bool = true)

Creates a value that describes the operations allowed for drags to other applications.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →