Contents

openBookmark

The app intent conforms to the Assistant schema for opening a bookmarked URL.

Declaration

var openBookmark: 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 .browser.openBookmark schema:

@AppIntent(schema: .browser.openBookmark)
struct OpenBookmarkIntent: OpenIntent {
    @Parameter
    var tab: TabEntity?

    @Parameter
    var target: BookmarkEntity

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

See Also

Actions