Contents

IntentResult

A type that contains the result of performing an action, and includes optional information to deliver back to the initiator.

Declaration

protocol IntentResult : Sendable

Overview

Instead of implementing this protocol, use the ReturnsValue, OpensAppIntent, ProvidesDialog, and ShowsSnippetView type aliases on your perform() implementation in combination with the result() methods as shown in the following example:

func perform() async throws -> some ReturnsValue<Int> & OpensAppIntent {
    .result(value: 1, opensIntent: MyOpensIntent())
}

Topics

Getting the result value

Communicating the result to the user

Associated Types

Type Methods

Default Implementations

See Also

Outcomes