Contents

ResolvedIntentResult

A type-safe result from performing an app intent.

Declaration

@dynamicMemberLookup struct ResolvedIntentResult

Mentioned in

Overview

After performing the app intent with run(), use the value property to inspect the output as shown in the following example:

let result = try await intent.run()

// Compare the result with an expected value.
XCTAssertEqual(try result.value, "Hello World")

// Access the return value's nested properties.
let name: String = try result.value.customerName

// Pass the return value to another intent for additional verification.
intent2.coffee = try result.value

Topics

Supporting types

Subscripts

See Also

Intent and query result verification