Contents

updateSettings

The app intent conforms to the schema for updating settings for an ebook.

Declaration

var updateSettings: 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 .books.updateSettings schema:

@AppIntent(schema: .books.updateSettings)
struct UpdateBookSettingsIntent: AppIntent {
    @Parameter
    var target: BookSettingsEntity

    @Parameter
    var page: Int?

    @Parameter
    var font: BookFont?

    @Parameter
    var theme: BookTheme?

    @Parameter
    var pageNavigationSetting: BookPageNavigationSetting?

    @Parameter
    var isTextJustified: Bool?

    @Parameter
    var isAllowMultipleColumns: Bool?

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

For more information about the .books app intent domain, see Making ebook actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.

See Also

Actions