I know that is possible to intercept a tap on a screen, but I want to know if is it possible to simulate a tap in a point of screen (with x and y coordinates). Thanks
UITouch *touch = [[UITouch alloc] initInView:view];
UIEvent *eventDown = [[UIEvent alloc] initWithTouch:touch];
[touch.view touchesBegan:[eventDown allTouches] withEvent:eventDown];
[touch setPhase:UITouchPhaseEnded];
UIEvent *eventUp = [[UIEvent alloc] initWithTouch:touch];
[touch.view touchesEnded:[eventUp allTouches] withEvent:eventUp];
[eventDown release];
[eventUp release];
[touch release];
from here http://cocoawithlove.com/2008/10/synthesizing-touch-event-on-iphone.html
If it is a non-jailbroken device, check this: PTFakeTouch (worked for ios 11). It only works inside your applications. Since you are using private APIs, you might get rejected from the App Store.
If you want to simulate system-wide touch events, you have to jailbreak your device.
Check these links for jailbroken devices:
Simulate Touch Event on iOS - jailbroken - iOS13+
Is possible to simulate touch event using an external keyboard on ios jailbroken?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With