Contents

addAudioToSlide

The app intent conforms to the schema for adding audio to a slide.

Declaration

var addAudioToSlide: 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 .presentation.addAudioToSlide schema:

@AppIntent(schema: .presentation.addAudioToSlide)
struct AddAudioToPresentationSlideIntent: AppIntent {
    @Parameter
    var target: PresentationSlideEntity

    @Parameter
    var audio: IntentFile

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

See Also

Actions