Summary
Tap native (non-Flutter) UI elements: iOS system dialogs (universal-link picker, permission prompts), Android consent sheets and runtime-permission prompts. Today fdb tap dispatches through Flutter's GestureBinding and can't reach UIKit/Android views.
$ fdb native-tap --at 200,400
$ fdb native-tap --text "Allow" # iOS sim only, via AX
Why
Blocker for any iOS investigation. A fresh sim shows OS dialogs (universal-link picker, Usercentrics consent, push notification prompt, etc.) before the Flutter UI is reachable. Same gap exists on Android for system permission sheets. Without this, the workaround is cliclick (requires macOS Accessibility permission) or manual tapping.
Implementation hints
- New file:
lib/commands/native_tap.dart, exports Future<int> runNativeTap(List<String> args).
- Branch on platform from
readPlatformInfo() in lib/process_utils.dart:
- Android (any):
adb -s <device> shell input tap <x> <y>. Read device id via readDevice(). Coordinates only (Android doesn't expose stable AX text from CLI without uiautomator dump).
- iOS simulator:
xcrun simctl io <udid> sendkey doesn't do taps. Use xcrun simctl io <udid> tap <x> <y> if available, or fall back to an AppleScript via osascript clicking the Simulator window. Document the choice in code comments.
- iOS physical: out of scope for v1. Print a clear error:
ERROR: native-tap on physical iOS not supported. Use idb (https://fbidb.io) for now.
- macOS: out of scope for v1. Same clear error.
- v1 supports
--at x,y only. --text is iOS-sim-only via AX, defer.
- The device udid for
xcrun simctl is the same id fdb devices reports for iOS sims. Confirm by reading readDevice().
Dos and don'ts
- Do print clear
ERROR: ... with install hint when the underlying tool is missing.
- Don't try to unify selectors across platforms in v1. Coordinates only.
- Don't shell out via
bash -c. Use Process.start with argv lists per CODE-STYLE.md.
- Don't add new dependencies.
Acceptance
Summary
Tap native (non-Flutter) UI elements: iOS system dialogs (universal-link picker, permission prompts), Android consent sheets and runtime-permission prompts. Today
fdb tapdispatches through Flutter'sGestureBindingand can't reach UIKit/Android views.Why
Blocker for any iOS investigation. A fresh sim shows OS dialogs (universal-link picker, Usercentrics consent, push notification prompt, etc.) before the Flutter UI is reachable. Same gap exists on Android for system permission sheets. Without this, the workaround is
cliclick(requires macOS Accessibility permission) or manual tapping.Implementation hints
lib/commands/native_tap.dart, exportsFuture<int> runNativeTap(List<String> args).readPlatformInfo()inlib/process_utils.dart:adb -s <device> shell input tap <x> <y>. Read device id viareadDevice(). Coordinates only (Android doesn't expose stable AX text from CLI without uiautomator dump).xcrun simctl io <udid> sendkeydoesn't do taps. Usexcrun simctl io <udid> tap <x> <y>if available, or fall back to an AppleScript viaosascriptclicking the Simulator window. Document the choice in code comments.ERROR: native-tap on physical iOS not supported. Use idb (https://fbidb.io) for now.--at x,yonly.--textis iOS-sim-only via AX, defer.xcrun simctlis the same idfdb devicesreports for iOS sims. Confirm by readingreadDevice().Dos and don'ts
ERROR: ...with install hint when the underlying tool is missing.bash -c. UseProcess.startwith argv lists perCODE-STYLE.md.Acceptance
lib/commands/native_tap.dartexists, exportsrunNativeTap, followsCODE-STYLE.mdfdb native-tap --at x,yworks on Android viaadb shell input tapfdb native-tap --at x,yworks on iOS simulatorERROR: ...on physical iOS and macOS pointing at alternativesbin/fdb.dart:_runCommandand listed inusagetask test:native-tap(Android-only is fine for v1)README.mdcommands table updatedskills/using-fdb/SKILL.mdupdated with iOS dialog dismissal exampletask analyzepasses