Siri AI Developer Preview support
a
adaminsley@gmail.com
I tested Apple's Siri AI Developer Preview (iOS 27.3 beta) with expo-app-intents 0.5.16 on Expo SDK 58, on a real iPhone.
The package works unchanged.
Siri called tools written in app-intents/
, including with the app closed and with the phone locked. A few preview-specific pieces needed workarounds, and I'd like to know whether you'd welcome contributions for them.Reproduction and write-up: https://github.com/airowe/siri-ai-expo
Setup:
Xcode 27.3 beta (27C5020n), iPhone 16 Pro on iOS 27.3 beta (24C5037i) with Siri AI on, Release build signed for development.### What worked with no package changes
- @AppIntent(.tool)intents inapp-intents/. Siri called them and spoke their dialog, with the app open, with it closed, and with the phone locked.
- @AppEntity(.generable)parameters filled in by Siri.
- Entities published from JavaScript with setEntityCatalogAsyncandreindexEntitiesAsync, found by Siri through Spotlight.
- A tool that calls an authenticated API and refreshes an expired token inside the Siri request.
### Where I needed workarounds
- Compiling the tool code.The tool macros only exist in the 27.3 SDK. I gated them behind a Swift compilation condition set by my own config plugin:
```js
entry.buildSettings.SWIFT_ACTIVE_COMPILATION_CONDITIONS =
"$(inherited) SIRI_AI_PREVIEW"
;```
- Deployment target.@Property(title:description:)is iOS 27.3+ only, and a property wrapper can't be limited to newer versions with an availability check. Any entity that uses it raises the whole app to iOS 27.3.
- Prebuild.expo prebuildregeneratesios/, so I need a script to re-add the Siri Evaluations test target after every prebuild. A Skills Bundle added in Xcode is presumably lost the same way (not yet verified).
- Siri answers from indexed data instead of calling the tool.This is the one I'd most like to see in the docs:
- With order status in the entity and its Spotlight description, Siri called the status tool in
3 of 8
runs. In the rest it gave the same facts in its own words, from the index.- With only the order's identity indexed (id, name, synonyms) and the tool reading status when it runs:
4 of 4
completed runs.- A tool with nothing indexed (a cart fetched from an API):
5 of 5
.- The rule: index what identifies a record, never the answer the tool exists to give.
- Locked phone.Tools that read a token need Keychain items readable after first unlock (kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly). With that, Siri read an authenticated result with the phone locked.
- Testing.Xcode 27.3 shipsSiriEvaluations.frameworkfor devices only, not for the Simulator.
### Question
Would you welcome contributions for any of these, or would you rather wait until the APIs leave beta?
- A config plugin option that sets the preview compilation condition and keeps the Siri Evaluations target and Skills Bundle through prebuild.
- A tool example for npx expo-app-intents init.
- Guidance in the docs and the bundled agent skill, covering points 4 and 5.
I'm also following
runBackgroundTask
(#51595), which covers tools answering from JavaScript, so I've left that out.