我们可以通过编程方式使用iOS锁定手机吗?

问题描述:

我需要设置一个计时器来从我的应用程序锁定iPhone.使用该应用程序时,应在3到5分钟后将手机锁定.

I need to set a timer to lock an iPhone from my app. While using the application, after 3 to 5 minutes the phone should become locked.

简短答案:您不能.

长答案: 对于iOS用户的安全性 ,Apple不允许任何应用程序与重要一起使用>硬件问题,例如锁定iPhone或控制其他应用程序的使用.如果您的应用程序甚至尝试执行此操作(使用任何方法,例如外部API),Apple都会立即拒绝您的应用程序.甚至都不值得尝试.

Long Answer: For the security of iOS users, Apple does not allow any application to work with important hardware matters, such as locking the iPhone or controlling the usage of other apps. If your app even attempts to do such a thing (using any method, like external APIs), your app will immediately be rejected by Apple. It is not even worth trying.