How can I simulate the touch events by IOHIDEvent?

…衆ロ難τιáo~ 提交于 2019-12-20 03:11:38

问题


I want to simulate touch events on iOS 6. I learned something useful from IOHIDEvent, which is a low-level functions bundle for human interface devices.

From: https://github.com/kennytm/iphone-private-frameworks/tree/master/IOKit/hid I got the private framework with IOHIDEvent, but the headers were changed after iOS 4, and some functions were not supported any more.

Does anyone know how to get the functions in iOS6, or known how to simulate the events at system-level?


回答1:


As I mentioned in my answer to your other question today, you might try looking at GSEvent.h from GraphicsServices.framework, or in IOKit.framework.

Here are some good answers on stackoverflow to help you:

iOS Private API: lock device and power off the screen

GSSendEvent - Inject Touch Event iOS

iOS touch event notifications (private API)




回答2:


May be UIAutomation helps you http://developer.apple.com/library/ios/#documentation/DeveloperTools/Reference/UIAutomationRef/_index.html ?

Or UISpec: http://code.google.com/p/uispec/wiki/Documentation



来源:https://stackoverflow.com/questions/17105027/how-can-i-simulate-the-touch-events-by-iohidevent

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