Skip to content

Match Xcode App Intents input options, output flags, and parameter summaries - #370

Merged
hyzyla merged 7 commits into
mainfrom
fix/appintents-metadata-369
Nov 28, 2026
Merged

hyzyla merged 7 commits into
mainfrom
fix/appintents-metadata-369

Conversation

@hyzyla

@hyzyla hyzyla commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #369.

The Linux App Intents extractor rejected @Parameter(inputOptions:), wrote incorrect outputFlags, and dropped plain parameterSummary declarations. This PR includes Brandon Elliott’s two original commits from #369 and extends their Xcode fixtures to cover string collections and summaries with omitted text.

  • Encode explicitly supplied keyboard, capitalization, and Boolean options for String, [String], and Set<String>. Omitted options produce no metadata entry.
  • Match Xcode’s output flags. OpensIntent sets 1, ShowsSnippetView sets 2, and ProvidesDialog sets 4. ReturnsValue adds no bit.
  • Preserve repeated interpolations and the order of inline and trailing parameters. Summary() omits the text field, while Summary("") emits an empty format string. When, Switch, and custom localization tables now produce explicit errors.

Verification

The original #369 probe app built from the same Swift source on Linux and with Xcode 27.2 (27B52). The two bundles matched on extract.actionsdata for all 11 actions and 24 parameters, and on version.json. The comparison keeps each input-option key paired with its value when Xcode changes dictionary order.

The Rust workspace suite passed 2,348 tests with one ignored. All 16 App Intents tests passed on Linux, along with 35 Python CI tests and five SDK and registration checks. Formatting and workspace Clippy with -D warnings passed.

Interactive snippets and SDK coverage

The follow-up fixes the missing interactive-snippet result flag and registers the backing snippet’s system protocol, default visibility, and availability. Explicitly discoverable snippets and snippets returning a value have separate native controls. Explicit inputConnectionBehavior values now match Xcode for all three enum cases.

Swift result Xcode 26.6 and 27.2 flags SweetPad on Linux
ShowsSnippetIntent 32 32
OpensIntent & ShowsSnippetView 3 3
OpensIntent & ProvidesDialog 5 5

A fresh build of the same nine-action, five-parameter Swift app with Xcode 27.2 and SweetPad on Linux produced the same registration file inventory and zero semantic differences in extract.actionsdata and version.json. The hosted workflow compiles the Swift sources on macOS and replays the compiler outputs through the Linux extractor. Across six supported apps, Linux matched all 27 actions captured by each Xcode version. A seventh app supplies five native diagnostic probes. The checker also tests the named diagnostic for each of 20 unsupported parameter labels.

Xcode 26.6 (17F113) exposed two more compatibility differences. It omits three newer enum and entity fields. For an instance parameter named parameterSummary, it infers the title and drops the explicit description, default, and string options. Xcode 27.2 preserves them. The extractor selects the schema using the compiler’s Xcode build identifier.

The checklist links 63 entries to evidence for 37 matches, 25 diagnostics and one native no-effect control (requestValueDialog). The reviewed SDK inventories cover 542 declarations in iOS 26.5 and 587 in iOS 27.2. CI checks the newest stable Xcode on its runner and flags new labels, changed overloads, native registration changes, and differences between Linux and Xcode. The full comparison preserves parameter order and checks the Xcode build identifier. Versioned checklist · App Intents CI

Conditional parameter summaries, non-nil localization tables, and the 20 classified parameter options still produce explicit diagnostics. Siri presentation and tapping a rendered snippet require separate runtime verification.

Brandon168 and others added 7 commits November 27, 2026 15:27
The parameter extractor rejected any @parameter that passes inputOptions,
a documented String parameter option, with "unsupported App Intents
parameter option 'inputOptions'". Xcode encodes each argument the source
passes as an LNValueTypeMetadataKeyString* entry in the parameter's
typeSpecificMetadata (keyboardType, capitalizationType, multiline,
autocorrect, smartQuotes, smartDashes) and omits arguments left at their
defaults.

Adds a probe covering every option and case, its Xcode 27.2 (27B52)
capture, and a test comparing the action with Xcode's output. The test
normalizes typeSpecificMetadata pair order, which Xcode writes in hash
order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two registration differences against Xcode 27.2 (27B52) captures:

- outputFlags had the ProvidesDialog and ShowsSnippetView bits swapped
  and ignored OpensIntent. Xcode writes OpensIntent = 1,
  ShowsSnippetView = 2, ProvidesDialog = 4 (ReturnsValue sets none).
  The existing Files probe uses both dialog and snippet, so its 6 hid
  the swap.
- static parameterSummary was dropped. Xcode writes it as
  actionConfiguration.actionSummary: the summary text with ${parameter}
  placeholders, the parameters it interpolates, and the parameters its
  trailing builder lists. Conditional summaries and localization tables
  now stop extraction instead of being dropped silently.

Adds an OutputProbe fixture with its Xcode capture and checks every
probe's actions against Xcode's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…summaries

Preserve the difference between omitted and empty summary text, and look up the static summary independently of an instance parameter with the same name. Encode string arrays and sets with their native capability masks.

Regenerate both probes with Xcode 27.2. Exercise repeated and ordered parameter references, and compare input-option metadata as key/value pairs in the bundle checks.
@hyzyla
hyzyla merged commit b2294ba into main Nov 28, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App Intents metadata: inputOptions rejected, outputFlags bits swapped, parameterSummary dropped

2 participants