Contents

OpensIntent

A result type that indicates your app intent returns another app intent.

Declaration

protocol OpensIntent : IntentResult

Mentioned in

Overview

Add this protocol as a return type for an app intent’s perform() method when the method returns another app intent to run. When returning the result, you can return any type of app intent that makes sense for the current action. For example, an app intent to create a photo album might return an app intent to open that album in the app’s interface. After you return an app intent as a result, the system runs it to perform its action.

The following code shows how to add this protocol to your perform() method. When returning an app intent, specify any type that adopts the AppIntent protocol.

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

See Also

Results