Skip to content

Send a screen edge with touches and swipes - #977

Open
ArloL wants to merge 1 commit into
meta:mainfrom
ArloL:edge-touches
Open

ArloL wants to merge 1 commit into
meta:mainfrom
ArloL:edge-touches

Conversation

@ArloL

@ArloL ArloL commented Oct 7, 2026

Copy link
Copy Markdown

Motivation

iOS recognises its system edge gestures (home, Notification Centre, back) from an edge flag on the touch, not from its position. FBSimulatorControl can set that flag since f04de8f and ede9a6a ("the CLI command follows"). But HIDTouch and HIDSwipe carry only points, so no client can trigger these gestures. That rules out, for example, testing what an app does when the user swipes home mid-gesture.

This adds an optional edge to HIDTouch and HIDSwipe, carried through the companion and the Python client, plus idb ui swipe --edge {top,left,bottom,right}. It defaults to NO_EDGE, so older clients and companions are unaffected.

Test Plan

  • Python tests pass, including the new edge tests.
  • ./build.sh build succeeds. The new HidRequestTranslationTests cases haven't run: I found no public target that builds CompanionTests.
  • On an iPhone 17 simulator with iOS 27, idb ui swipe 201 873 201 437 is a drag inside the app, and adding --edge bottom goes to the home screen. A Python stream of HIDTouch(…, edge=HIDEdge.BOTTOM) touches goes home too.

Docs: website/docs/idb/ui.mdx.

iOS recognises its system edge gestures from an edge flag on the touch, not
from its position. FBSimulatorControl can set that flag, but HIDTouch and
HIDSwipe carried only points, so no client could reach it.

Both gain an optional `edge`, defaulting to NO_EDGE, carried through the
companion and the Python client; `idb ui swipe` gains `--edge`.
@meta-cla

meta-cla Bot commented Oct 7, 2026

Copy link
Copy Markdown

Hi @ArloL!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla Bot added the CLA Signed label Oct 7, 2026
@meta-cla

meta-cla Bot commented Oct 7, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant