AppIntent(_:)
Makes an existing app intent available to Siri as a tool.
Declaration
@attached(extension, conformances: ToolIntent) macro AppIntent(_ traits: AppIntentTraits)Parameters
- traits:
The intent’s roles, such as
.toolor[.tool].
Overview
Apply this macro to a structure or class that conforms to AppIntent. It adds a ToolIntent conformance, using the availability declared on the type, or the availability of ToolIntent when the type declares none.
@AppIntent(.tool)
struct SearchFlights { ... }