问题
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