Simulating system-wide touches in iOS 7

2019-03-14 04:34发布

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条回答
女痞
2楼-- · 2019-03-14 05:09

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

查看更多
登录 后发表回答