[英]How can I override the iPhone's home and sleep hardware buttons?
Is it possible to override the hardware home and sleep buttons on the iPhone? 是否可以覆盖iPhone上的硬件主页和睡眠按钮? I did a lot of research on this, but I was unable to find any definitive answers out there.
我对此进行了大量研究,但无法找到任何明确的答案。
I'm not looking to design something malicious, but I was curious about the possibility of doing this for a personal project on my own iPhone. 我不是要设计恶意软件,但我对在自己的iPhone上为个人项目执行此操作的可能性感到好奇。
不可能,操作系统在内核中拦截这些中断并适当地分派消息。
This is possible on a jailbroken device only. 仅在越狱设备上才有可能。 There are addons available that in fact "catch" hardware button events.
有可用的附件,实际上是“捕获”硬件按钮事件。 I can't tell you how it works, though.
不过,我无法告诉您它是如何工作的。
I suggest looking for "jailbreak" and "home button" with a search engine of your choice, for a start. 我建议您先从您选择的搜索引擎中寻找“越狱”和“主页按钮”。
Since this is for personal use, jailbreaking may be acceptable. 由于这是供个人使用,因此可以越狱。
However on a non-jailbroken device (and certainly for any app that should hit the appstore) there is no way to intercept the hardware button events. 但是,在非越狱设备上(当然,对于应该访问应用程序商店的任何应用程序),无法拦截硬件按钮事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.