mirror of
https://github.com/software-mansion/argent.git
synced 2026-09-14 19:27:14 +08:00
65bec9010c
Modern iOS permission prompts (TCC dialogs like "Allow X to use your
location?") are hosted by a separate XPC process. The daemon's three
existing AX lookups — primaryApp, applicationAtCoordinate(centre),
systemApplication — all return nothing for them, so `describe` ends up
rendering an empty ROOT and silently falls through to native-devtools'
in-app view walk (which only sees the underlying app, never the prompt
buttons).
The companion daemon change in argent-private#10 adds a last-resort
sweep via `[AXElement currentApplicationsIgnoringSiri]`, gated on
alertVisible AND both prior arrays being empty, and lands the result in
a new `dialogElements` wire field. This commit wires that field through
the TS layer:
- Declare `dialogElements?: AXDescribeElement[]` on AXDescribeResponse
and forward it from the blueprint's describe() handler.
- Add an adapter fallback after `elements`: when the primary walk
produced zero usable children, use dialogElements. The daemon
already gates on prior-walks-empty, but the same condition is
enforced adapter-side to defend against older/newer daemon builds
and avoid duplication.
- Bump the argent-private submodule to the branch that ships the
daemon change.
Tests cover the new fallback (Maps location prompt shape) and the
defensive precedence (elements wins when both are populated).