App intent domains

App intent domains

App intent domains Declare support for well-known actions and content by applying system-defined schemas to your app intents, app entities, and app enumerations.

Overview

To help the system use your app intents, app entities ,and app enumerations correctly, conform your types to system-defined schemas whenever possible. Schemas tell the system how to interpret your type. For example, when an app intent in a mail app conforms to the .mail.createDraft schema, the system knows that the app uses the intent to create new draft emails. Siri, Apple Intelligence, and other system features use this information to enhance their understanding of your app’s content and to facilitate interactions.

To apply a schema to one of your types, precede its declaration with the AppIntent(schema:)), AppEntity(schema:)), or AppEnum(schema:)) macro. During compilation, the macros expand and map the type to the schema you specify.