gstack/ios-qa
dwidoo 56c8f523a8 fix(ios-qa): SwiftUI Button tap on iOS 17 + Documents/ boot token
Two infra fixes surfaced by a real onboarding session on iPhone SE 2020 /
iOS 17.7 with USB-direct CoreDevice tunnel.

1. Bridges.swift.template — MutationBridgeImpl.handleTap now tries
   accessibilityActivate() on the smallest button-trait AX element
   containing the tap point BEFORE falling back to DebugBridgeTouch's
   UITouch synthesis. SwiftUI Buttons on iOS 16/17 don't route through
   _UIHitTestContext (iOS 18+ only), so the original UITouch path missed
   them entirely — /tap returned {"op":"tap","ok":true} but no
   Button.action fired, screen unchanged. Walks both accessibilityElements
   (eager array) and the indexed protocol to cover SwiftUI hosting
   controllers and UIView-backed AX elements. Falls through to UITouch
   for gesture recognizers / scroll views / custom hit-test-only views.

2. StateServer.swift.template + tunnel-bootstrap.ts — bootToken file
   now lives in Documents/ instead of NSTemporaryDirectory(). iOS clears
   tmp/ aggressively (memory pressure, jetsam, between launches), so the
   daemon's `devicectl copy from tmp/gstack-ios-qa.token` returned ENOENT
   and bootstrap failed with `boot_token_unavailable` even though
   StateServer was alive and answering /healthz. Documents/ survives
   backgrounding + memory pressure and is reachable via the same
   appDataContainer domain identifier. Both ends updated to stay
   consistent (StateServer writes Documents/, tunnel-bootstrap defaults
   reads Documents/).

Repro env: macOS 14.x, Xcode 16.2, iPhone SE 2020 (iPhone12,8) iOS 17.7,
USB-direct CoreDevice tunnel, gstack v1.43.3.0 → v1.48.0.0 (issue exists
in both).

Tests: 91/91 daemon tests pass. DebugBridge SPM (swift 5.9+) builds clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:52:05 +02:00
..
daemon fix(ios-qa): SwiftUI Button tap on iOS 17 + Documents/ boot token 2026-05-28 00:52:05 +02:00
docs v1.43.0.0 feat: iOS device-farm (5 skills, Mac daemon, Tailscale) (#1574) 2026-05-21 16:09:26 -07:00
scripts v1.43.0.0 feat: iOS device-farm (5 skills, Mac daemon, Tailscale) (#1574) 2026-05-21 16:09:26 -07:00
templates fix(ios-qa): SwiftUI Button tap on iOS 17 + Documents/ boot token 2026-05-28 00:52:05 +02:00
SKILL.md v1.48.0.0 feat: AskUserQuestion split rule + runtime AUTO_DECIDE carve-out (#1740) 2026-05-26 23:43:07 -07:00
SKILL.md.tmpl v1.43.0.0 feat: iOS device-farm (5 skills, Mac daemon, Tailscale) (#1574) 2026-05-21 16:09:26 -07:00