Is it possible to capture touch events in the background on a jailbroken iOS device?

瘦欲@ 提交于 2019-12-12 18:22:17

问题


I have an installation project in mind which involves a hacked iPad - I'd like to have a background process running recording all the touch events regardless of what app is running in the foreground, and send them out via OSC.

Note that this is using a jailbroken iPad with root access, and users will be alerted about not entering any sensitive data. But I'm not an iOS developer so I'm not sure if this is even possible. I'd appreciate any kind of input/suggestions.

[edit] Since someone questioned my motive behind this question, I'll try to explain a bit: to be specific, I'd like to build a mechanical system with Arduino that emulates the user's touch input on the iPad, but I do not want to limit them to using an app that does nothing else but recording touch events.


回答1:


There are three options:

  1. Use the IOHIDFamily subsystem to capture all the touch events. This will do most of the processing for you, the only thing you'll need to do is fetch the events using a HID client, get their types, and if they are touch events, get their position, radius and other things you need.
  2. Use the MultitouchSupport framework. This way you will have to process the digitizer data frames manually which is tricky.
  3. Use a MobileSubstrate hook to hook the already existing HID client inside SpringBoard.


来源:https://stackoverflow.com/questions/8303235/is-it-possible-to-capture-touch-events-in-the-background-on-a-jailbroken-ios-dev

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