简体   繁体   English

如何覆盖iPhone的“主页”和“睡眠”硬件按钮?

[英]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.

相关问题 如何检查我的iPhone应用程序在什么硬件上运行? - How can I check what hardware my iPhone app is running on? iPhone:如何在视图中随机播放按钮 - iPhone:How can I shuffle buttons in view iPhone SDK - 如果按下硬件按钮,如何禁用音量指示器视图? - iPhone SDK - How to disable the volume indicator view if the hardware buttons are pressed? 如何在UIActionsheet的按钮上添加复选标记,我可以在iphone中创建刻度标签? - how to add checkmark on UIActionsheet's buttons where i can create tick label in iphone? iscroll on iphone:视觉扭曲。 我怀疑它与硬件有关吗? - iscroll on iphone: visual distortions. I suspect it's hardware related? iPhone,如何在动作表按钮中缩小字体? - iPhone, how can I make the font size smaller in actionsheet buttons? 如何在iPhone应用程序中实现半圆形按钮 - How can I implement semicircle-shaped buttons in iPhone applications iPhone / Safari:如何在睡眠模式下继续执行javascript? - iPhone/Safari: How can I continue to execute javascript while in sleep mode? 如何防止iPhone(包括iOS 7)在HTML或JS中入睡? - How can I prevent iPhone (including iOS 7) from going to sleep in HTML or JS? iOS:当iPhone处于睡眠模式或按主屏幕按钮时,执行NSURLConnection - iOS: Perform NSURLConnection when iphone is in sleep mode or when i press the home button
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM