Skip to content

v0.12.0

Choose a tag to compare

@touyou touyou released this 20 Jun 14:11
· 23 commits to main since this release
c6b1331

Follow-up release after v0.11.0 reflecting the matsudate WWDC 2026 review #4 survey: three additive, opt-in items (#55 intent donation, #52 IntentParameter.ValueState, and the system.searchInApp schema rename) plus the deferred-items punch list in CLAUDE.md. All three packages are released together at the same version.

app_intents 0.12.0

  • New API AppIntents().donateIntent(identifier, params) (#55): wraps AppIntent.donate() (stable iOS 16+) so the Dart side can record an executed intent for Siri / Apple Intelligence to learn from. The call is forwarded through AppIntentsPlugin.intentDonationForwarder (set in AppDelegate, mirroring relevantEntitiesDonationForwarder) to FlutterBridge.shared.donateIntent, which invokes the per-intent reverse-executor emitted by @IntentSpec(donatable: true) codegen. iOS-only; a no-op on other platforms.
  • iOS native:
    • AppIntentsPlugin.intentDonationForwarder static hook for AppDelegate wiring. The donateIntent MethodChannel case returns DONATION_NOT_CONFIGURED when the forwarder is not set.
    • FlutterBridge.shared.registerIntentDonator(intentIdentifier:_:) / donateIntent(intentIdentifier:params:) / hasIntentDonator(for:); the donators dictionary is cleared by clearExecutors() alongside the other executor slots.
  • Docs (docs/usage.md): adds the intentDonationForwarder wiring example next to the existing relevantEntitiesDonationForwarder block, plus the matching register<Intent>Donator() call site.

app_intents_annotations 0.12.0

  • @IntentSpec(donatable: true) — opt-in for AppIntent.donate() so Siri / Apple Intelligence learns the user performed the action in-app (#55). Inert unless the donation experimental feature is enabled in app_intents_codegen. MVP restricts to primitive parameter types (String / int / double / bool / DateTime, optionals allowed); entity / file / enum / union / collection params are rejected at codegen time.
  • @IntentParam(useValueState: true) — opt-in for IntentParameter.ValueState (@available(iOS 18.2, *) stable — no #if gating required). Distinguishes unset / set / cleared for an optional update parameter so the Dart handler can tell "don't touch" from "explicitly cleared." Only valid on a nullable Dart type; analyzer rejects use on non-optional params.
  • AppSchemas.system.searchInApp — typed accessor for the iOS 27 system search-in-app schema (iOS 17 used .system.search; iOS 27 renamed it). The iOS-17 identifier remains reachable via AppSchemas.of(AppSchemaDomain.system, 'search'). Also adds AppSchemas.system.open.

app_intents_codegen 0.12.0

  • @IntentSpec(donatable: true) (#55, requires --experimental=donation): emits a #if APP_INTENTS_WWDC26-gated register<Intent>Donator() reverse-executor that reconstructs the concrete intent from a [String: Any] params dict and calls intent.donate() (stable iOS 16+). Analyzer enforces the MVP primitive-only contract; rejects entityType / enumType / fileType / entityCollectionType / @UnionValue / non-primitive Dart types at codegen time.
  • @IntentParam(useValueState: true) (#52): emits if #available(iOS 18.2, *) { switch $field.valueState { … @unknown default … } } in perform() and adds a sibling "<field>State": "unset" | "cleared" | "set" entry to the wire dict. The state key is added via if let in both FlutterBridge and cache-mode emit paths, so it is absent on iOS < 18.2 and the Dart handler can distinguish "no state info" from a present state. Analyzer rejects opt-in on non-optional Dart params. The Swift output uses @unknown default to future-proof against Swift 6's non-frozen enum errors. No experimental flag — this is a normal feature (the SDK symbol is stable iOS 18.2).
  • AppSchemas.system.searchInApp — codegen consumes the schema string verbatim through the existing @AppIntent(schema:) / @AppEntity(schema:) macro emission (the app-schema experimental gate is unchanged); no codegen change beyond the typed accessor that lives in app_intents_annotations.
  • Bumps app_intents_annotations dependency to ^0.12.0.

Repo meta

CLAUDE.md adds a new Deferred WWDC26 punch list section reserving ADR numbers 0005–0010 for the seven defer-with-ADR items uncovered by the matsudate review #4 audit (snippetView, dialogFullSupporting, requestValue, PlaceDescriptor export, LongRunningIntent progress/cancel forwarding, SyncableEntityIdentifier dual-id, @AppIntentsPackage). One document-only item (notificationEntity) is also tracked.

Verification

  • All three Dart unit-test suites green (annotations, codegen, plugin), Swift AppIntentsBridge suite green (26 tests, .serialized trait fixed the shared-singleton race when adding the new intent-donator tests).
  • swiftc -typecheck of the useValueState emit pattern against the Xcode 27 beta iOS 27 SDK (target iOS 17.0): exit 0, no warnings.
  • The example app's regenerated Swift is byte-identical to the previous commit — the opt-in design means existing intents that don't opt in are completely unaffected.