-->

Simulating system-wide touches in iOS 7

2019-03-14 04:22发布

问题:

GSSendEvent does not work anymore for me.

Even subscribing a callback function using GSEventRegisterEventCallBack does not fire with touch events, [UIEvent _gsEvent] returns NULL.

What happened?

回答1:

Now iOS uses IOHIDEvent (in IOKit.framework) for touch events.

backboardd create touch events and sent to SpringBoard, and SpringBoard receives it by UIApplicationHandleEventQueue

Anyway, if you have jailbroken device and want to simulate touch, just use SimulateTouch library. You can download it from Bigboss's repo, and API info is here http://api.iolate.kr/simulatetouch/

Also, this is open source. https://github.com/iolate/SimulateTouch