resolved(from:)
Resolves an entity from an exported intent file through the entity type’s transferable conformance.
Declaration
func resolved(from file: IntentFile) async throws -> AnyAppEntityParameters
- file:
The
<doc://com.apple.documentation/documentation/appintents/intentfile>containing the exported entity data.
Return Value
The resolved entity.
Discussion
Use this to verify the import direction — that an IntentFile produced by AnyAppEntity/exported(as:)-swift.method (or constructed from test data) can be resolved back into an entity through the same pipeline used at runtime.
let file = try await entity.exported(as: .json)
let resolved = try await coffeeOrderDef.resolved(from: file)