App Intents (iOS 26+)
Implement, review, and extend App Intents to expose app functionality to Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence.
Contents
- Triage Workflow
- AppIntent Protocol
@Parameter- AppEntity
- EntityQuery (4 Variants)
- AppEnum
- AppShortcutsProvider
- System Surface Integration
- iOS 26 Additions
- Common Mistakes
- Review Checklist
- References
Triage Workflow
Step 1: Choose the action, boundary, and surface
Start from 1-3 valuable actions people want outside the app, not from its screen hierarchy. Record one design row per action: user goal; inline result or app destination; shared domain operation; parameters and entity query; confirmation/authentication; target surface and protocol. Use one explicit runtime route for app handoff instead of scattering navigation side effects through intents.
Then choose the system feature and protocol that fit that action:
Step 2: Define the data model
- Prefer
AppEntityshadow models for app data exposed to the system. - Create
AppEnumtypes for fixed parameter choices. - Choose the right
EntityQueryvariant for resolution. - Mark searchable entities with
IndexedEntityandindexingKeymetadata.
Step 3: Implement the intent
- Conform to
AppIntent(or a specialized sub-protocol). - Declare
@Parameterproperties for all user-facing inputs. - Implement
perform() async throws -> some IntentResult. - Add
parameterSummaryfor Shortcuts UI. - Register phrases via
AppShortcutsProvider.
Step 4: Verify
- Build and run in the target system surface to confirm discovery, parameter resolution, cancellation, confirmation, authentication, result rendering, and app handoff.
- If a step fails, reset the fixture, fix the smallest intent/entity/query boundary, and rerun the same action from the same surface before adding another action.
- Test Siri phrases with the intent preview in Xcode.
- Confirm
IndexedEntityinstances are indexed in a named Spotlight index. - Check widget configuration for
WidgetConfigurationIntentintents.
AppIntent Protocol
The system instantiates the struct via init(), sets parameters, then calls
perform(). Declare a title and parameterSummary for Shortcuts UI.
Optional members: description (IntentDescription), openAppWhenRun (Bool),
isDiscoverable (Bool), authenticationPolicy (IntentAuthenticationPolicy).
@Parameter
Declare each user-facing input with @Parameter. Non-optional parameters are
required; the system requests values when needed. Defaults pre-fill a useful
value. Optional parameters are not requested automatically, so ask for them in
perform() when the intent cannot continue without a value.
Supported value types
Primitives: Bool, Int, Double, String, Duration, Date, Decimal,
Measurement, and URL. Collections: Array and Set of supported element
types. Framework: IntentPerson, IntentFile. Custom: any AppEntity or
AppEnum.
Common initializer patterns
See references/appintents-advanced.md [blocked] for all initializer variants.
AppEntity
Prefer shadow models that mirror app data and expose only system-facing fields. Direct model conformance is allowed when the model is lightweight, stable, and appropriate for App Intents lifecycles.
Required: id, defaultQuery (static), displayRepresentation,
typeDisplayRepresentation (static). Mark properties with @Property(title:)
to expose for filtering/sorting. Properties without @Property remain internal.
EntityQuery (4 Variants)
1. EntityQuery (base -- resolve by ID)
2. EntityStringQuery (free-text search)
3. EnumerableEntityQuery (finite set)
4. UniqueAppEntityQuery (singleton, iOS 18+)
Use for single-instance entities like app settings.
See references/appintents-advanced.md [blocked] for EntityPropertyQuery with
filter/sort support.
When one parameter determines another parameter's valid entity choices, use
@IntentParameterDependency in the query or options provider. The advanced
reference covers the nil-upstream case and intentional defaults.
AppEnum
Define fixed sets of selectable values. RawValue must conform to
LosslessStringConvertible; prefer String raw values for readable, stable
identifiers.
AppShortcutsProvider
Register pre-built shortcuts that appear in Siri and the Shortcuts app without user configuration.
Phrase rules
- Every phrase MUST include
\(.applicationName). - Phrases can reference parameters:
\(\.$soup). - Call
updateAppShortcutParameters()when dynamic option values change. - Use
negativePhrasesto prevent false Siri activations.
System Surface Integration
Read references/system-surfaces.md [blocked] when
implementing Siri donation/prediction, interactive widgets, Control Center
configuration/action separation, or Spotlight IndexedEntity indexing.
iOS 26 Additions
SnippetIntent
Display interactive snippets in system UI:
The system may call perform() multiple times, including after snippet button
or toggle actions; keep SnippetIntent.perform() side-effect-free and do
mutations in the calling action intent or a separate button/toggle action. A
snippet-only intent is not discoverable in Shortcuts or Spotlight unless
isDiscoverable is true.
IntentValueQuery (Visual Intelligence)
Only one IntentValueQuery can take SemanticContentDescriptor; use
@UnionValue when one query must return multiple app entity types. Treat
labels as high-level English descriptors, not exhaustive synonyms or app
taxonomy; combine them with pixelBuffer when available. Return small, ranked,
cancellation-friendly results, and provide an OpenIntent, URL representation,
or in-app search handoff for details and more results. Do not implement camera
capture, Vision VN* requests, barcode classification, or Spotlight indexing
inside the App Intents query; call an existing bounded app search or image-match
service instead, with explicit result caps and timeouts when work may exceed a
system UI budget.
Common Mistakes
-
Exposing too much app model state through AppEntity. Prefer dedicated shadow models with stable persistent IDs and only system-facing properties.
-
Missing
\(.applicationName)in phrases. EveryAppShortcutphrase MUST include the application name token. Siri uses it for disambiguation. -
Treating optional
@Parameteras required. Optional parameters are not requested automatically; callrequestValue/needsValueErrorwhen the intent cannot proceed without one. -
Using unstable AppEnum raw values.
Intis valid, butStringraw values are usually clearer for persistence and URL representations. -
Forgetting
suggestedEntities(). Without it, the Shortcuts picker shows no defaults. -
Throwing for missing entities in
entities(for:). Omit missing entities instead. -
Stale Spotlight index. Re-index entities with a named
CSSearchableIndex. -
Missing
typeDisplayRepresentation. BothAppEntityandAppEnumrequire it. -
Using deprecated
@Assistant*schema macros. Use@AppIntent(schema:),@AppEntity(schema:), and@AppEnum(schema:). -
Blocking or side-effecting perform(). Use
awaitfor I/O; keepSnippetIntent.perform()side-effect-free because the system may rerun it. -
Mutating sensitive state from system surfaces without a guard. Use confirmation and/or authentication for actions such as door locks, lights, purchases, and deletes.
Review Checklist
- Every
AppIntenthas a descriptivetitle(verb + noun, title case) - Required
@Parametervalues are non-optional; optional values are requested when needed -
AppEntitytypes expose stable IDs and only system-facing properties -
AppEntityhasdisplayRepresentationandtypeDisplayRepresentation -
EntityQuery.entities(for:)omits missing IDs;suggestedEntities()implemented - Dependent options use
@IntentParameterDependency;defaultResult()is present only when a genuinely useful default exists -
AppEnumprefers stableStringraw values withcaseDisplayRepresentations -
AppShortcutsProviderphrases include\(.applicationName);parameterSummarydefined -
IndexedEntityproperties use key-pathindexingKeyvalues and entities are indexed - Control Center intents conform to
ControlConfigurationIntent; widget intents toWidgetConfigurationIntent; no-default control parameters are optional - Sensitive App Intents request confirmation and/or authentication before mutating state
- Visual Intelligence
IntentValueQueryusesSemanticContentDescriptor, bounded results, opening paths, and iOS 26 availability - No deprecated
@AssistantIntent/@AssistantEntity/@AssistantEnumschema macros -
perform()uses async/await (no blocking); runs in expected isolation context; intent types areSendable
References
- Read references/system-surfaces.md [blocked] for Siri, widgets, Control Center, and Spotlight integration patterns.
- See references/appintents-advanced.md [blocked] for
@Parametervariants, EntityPropertyQuery, assistant schemas, focus filters, SiriKit migration, error handling, confirmation flows, authentication, URL-representable types, and Spotlight indexing details.


