Contents

addVideoToPage

The app intent conforms to the schema for adding a video to a page in a text document.

Declaration

var addVideoToPage: some AssistantSchemas.Intent { get }

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.addVideoToPage schema:

@AppIntent(schema: .wordProcessor.addVideoToPage)
struct AddVideoToWordProcessorPageIntent: AppIntent {
    @Parameter
    var target: WordProcessorPageEntity

    @Parameter(supportedContentTypes: [.movie])
    var video: IntentFile

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

See Also

Actions