Contents

open

The app intent conforms to the schema for opening a text document.

Declaration

var open: some AssistantSchemas.Intent { get }

Mentioned in

Overview

Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the .wordProcessor.open schema:

@AppIntent(schema: .wordProcessor.open)
struct OpenWordProcessorDocumentIntent: OpenIntent {
    @Parameter
    var target: WordProcessorDocumentEntity

    func perform() async throws -> some IntentResult {
        .result()
    }
}

See Also

Actions