【发布时间】:2009-11-17 03:45:47
【问题描述】:
我正在编写一个在越狱 iPhone 上在后台运行的应用程序。我需要向 iPhone OS 发送触摸事件来模拟手指触摸。这可能吗?
【问题讨论】:
我正在编写一个在越狱 iPhone 上在后台运行的应用程序。我需要向 iPhone OS 发送触摸事件来模拟手指触摸。这可能吗?
【问题讨论】:
请参阅 Matt Gallagher 的文章 "Synthesizing a touch event on the iPhone"。您还可以查看Three20 framework,我相信它使用合成的触摸事件来测试 UI 元素(由于使用私有 API,导致最近出现大量application rejections)。
【讨论】:
是的,可以使用 GSEvents。试试 KennyTM 的私有框架和 GSEvent.h。它在 GraphicServices 框架下。 https://github.com/kennytm/iphone-private-frameworks
【讨论】: