Simulating system-wide touches in iOS 7

纵饮孤独 提交于 2019-12-03 10:17:54

问题


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



来源:https://stackoverflow.com/questions/19093619/simulating-system-wide-touches-in-ios-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!