IOS中进入SpringBoard进程
我的应用程序有一个要求,我需要检查 iphone/ipad 是否设置了密码保护,如果没有,我的应用程序需要通知用户为设备设置密码保护...我遇到了 < a href="https://stackoverflow.com/questions/2547295/can-i-tell-if-the-iphone-has-a-passcode">帖子,用户说如果我可以访问跳板过程并使用[SBAwayController isPasswordProtected]
功能,我可以知道密码是否设置。
我的问题是我不知道如何进入跳板进程,也不知道如何使用上面的代码工作。
如果有人能在这方面帮助我,那就太好了。
I was having a requirement in my app where I need to check whether the iphone/ipad has a passcode protect set and If not, my app needs to notify the user to set a passcode protect for the device... I came across a post where a user says that if I can get to the springboard process and use the [SBAwayController isPasswordProtected]
functionality, I can know if the passcode is set or not..
My problem is I do not know how to get to the springboard process and I dont know how to use the above code to work.
It would be great if someone could help me out in this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在未越狱的 iPhone 上,无法访问 Springboard 进程,也无法直接确定用户是否设置了密码。您可以通过 创建受保护的文件,然后等待查看是否被锁定,但我认为您不能明确地说用户没有使用这种方法设置密码。
在企业环境中,您可以使用 Apple 企业部署指南,这可能是一个更好的解决方案。
另请参阅我如何查明 iPhone 用户当前是否设置了密码并启用了加密?。
On a non-jailbroken iPhone, there's no way to access the Springboard process and no direct way to determine whether the user has set a passcode. You can sort-of detect passcode locking by creating a protected file and then waiting to see whether you get locked out of it, but I don't think you can ever definitively say that the user has not set a passcode using this approach.
In an enterprise environment, you can require passcodes by setting policies at the device level, using the instructions in Apple's Enterprise Deployment Guide, which may be a better solution.
See also How can I find out if the iPhone user currently has a passcode set and encryption enabled?.