App Intents
The App Intents framework exposes app actions and data to the system so Siri, Shortcuts, Spotlight, widgets, the Action Button, Control Center, and Apple Intelligence can discover and invoke them. It is the modern, code-first path for most apps. Key user-facing actions SHOULD be modeled as App Intents.
Define an AppIntent
A unit of app behavior is a type conforming to AppIntent. It needs a title and a perform() method; expose user-supplied inputs as @Parameter properties.
- An intent type MUST conform to
AppIntentand implementfunc perform() async throws -> some IntentResult. - Each intent MUST declare a static
title: LocalizedStringResourceand SHOULD setdescriptionso the action reads clearly in Shortcuts and Spotlight. - User inputs MUST use
@Parameterwith a typed,IntentParameter-supported type (primitives,AppEnum, or anAppEntity). perform()MUST be idempotent-safe where the system may retry, and MUST throw a typed error rather than failing silently.- Return value SHOULD use the most specific
IntentResult(e.g..result(value:),&ProvidesDialog,&ReturnsValue) so results chain into other actions.
Zero-config discovery with AppShortcuts
AppShortcutsProvider registers shortcuts that work the moment the app is installed — no user setup required.
- Conform one type to
AppShortcutsProviderand returnAppShortcutvalues from theappShortcutsbuilder. - Each
AppShortcutMUST supplyphrasescontaining\(.applicationName)so Siri can resolve the invocation. - High-value actions SHOULD ship as
AppShortcuts so users get voice and Spotlight access with no configuration.
Model app data with AppEntity and EntityQuery
To let intents accept or return your domain objects, make them discoverable.
- A domain type exposed to intents MUST conform to
AppEntity(stableid,displayRepresentation, and adefaultQuery). - Provide an
EntityQuery(orEntityStringQuery/EnumerableEntityQuery) so the system can resolve entities by id, by search string, or by enumeration. - Queries SHOULD be backed by your real data layer, not hardcoded — they are how Siri and Shortcuts fetch live values.
Choosing App Intents over legacy SiriKit
- For new work, prefer the App Intents framework. The older SiriKit Intents (Intents.framework,
.intentdefinitionfiles, intent extensions) remains for specific domains (messaging, payments, CarPlay-style domains) but is legacy for general app actions. - Do NOT add a new SiriKit custom intent for an action that App Intents can express; migrate existing custom intents when touched.
FORECASTS (verify against current docs)
- Apple Intelligence / on-device-model surfaces for App Intents evolve release-to-release. Treat any "App Intents power feature X" capability beyond Siri, Shortcuts, Spotlight, widgets, Control Center, and the Action Button as a FORECAST and confirm against the App Intents documentation for the OS version you target.