How does the system find your intents, and why can they not be registered at runtime?

19.9.3 · L5 · Interview

Predict first

Where does the system read the list of your intents from?

// build: xcodebuild -sdk iphonesimulator build
// then inspect: Bank.app/Metadata.appintents/extract.actionsdata (actions.AddNote)
  • A JSON file generated at build time inside the app bundle
  • A runtime registration call made in application(_:didFinishLaunching:)
  • The Info.plist

Mental model. It is like a restaurant menu printed before opening night: the waiter cannot take an order for a dish that is not on it, however good the kitchen is.

Intents are discovered at build time. When an app or extension target is built, Xcode runs the App Intents metadata processor over the compiled module and writes a Metadata.appintents folder into the bundle, containing extract.actionsdata (JSON) and version.json. In a small app with one intent (AddNote with a text parameter), the JSON listed it under actions with its identifier, parameters, isDiscoverable: true and openAppWhenRun: false, next to empty sections for entities, enums, queries and auto shortcuts. The system reads that file when the app is installed to populate Shortcuts, Spotlight and Siri, which is why there is no runtime registration API: an intent not compiled into the target does not exist for the system.

Practical results: intents in a Swift package or static library need to be surfaced to the app target (the AppIntentsPackage mechanism), so keep them in the app or widget target while you are learning it; when an intent does not appear, look for the bundle’s Metadata.appintents and check the build log for the processor step; and an intent shared by app and widget must be compiled into the process that should run it (Q407). Run once with Xcode 27.2 via a hand-made project; this is recorded in NOTES.md rather than in verify.py because it needs xcodebuild.

The metadata processor writes Metadata.appintents at build time; the build that was run produced exactly this layout.

Common traps

  • Expecting an intent in a dependency to show up automatically. The metadata is extracted per target.
  • Looking for intents in the running process. The system reads the file, not your code.

They might follow up with

  • How do I see what was extracted? Open Metadata.appintents/extract.actionsdata inside the built .app.

Related questions

  • 19.5.1 What are App Intents, App Entities and App Shortcuts, how do they replace SiriKit and Intents extensions, and…
  • 19.4.2 How do configurable widgets, interactive buttons and Control Center controls work with App Intents?
  • 19.7.2 How do you treat extensions, widgets and intents as a public API of the product: shared modules, data…

← How do AppEnum, AppEntity and EntityQuery work together, and how do…