如何以编程方式在iPhone上启用“引导访问"(信息亭模式)? [英] How can I programmatically enable Guided Access (Kiosk mode) on an iPhone?

查看:135
本文介绍了如何以编程方式在iPhone上启用“引导访问"(信息亭模式)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

如何在iPhone上自动执行引导访问模式?我将需要自动启用和删除此功能

How do I automate Guided Access mode on an iPhone? I will need to automate the enabling and removal of this feature

背景 爱荷华州的此应用使用iOS应用程序显示您的驾驶执照.问题在于,将手机移交给授权机构后,他们就可以完全访问该设备.

Background This application from the State of Iowa uses an iOS app to display your drivers license. The issue is that after handing your phone over to authorities, they have full access to the device.

如果我有与此相关的源代码,或者类似的应用程序,那么从临时的自助服务机模式"切换出来时,如何要求输入密码,以使手机或手机都无法提供照片,电子邮件或短信? (理想情况下)通过USB.

If I have the source code to this, or a similar application, how can I require a password when switching out of temporary "Kiosk mode", so that photos, emails or text messages are not available from either the phone, or (ideally) from USB.

我发现了类似的适用于Android的解决方案,但现在正在寻找iOS解决方案

I found this similar solution for Android, but am now looking for an iOS solution

推荐答案

您可以在应用程序内进入和退出引导式访问模式.但是,为此,必须对设备进行监督,并安装MDM配置文件,该配置文件在可以请求引导访问模式的应用程序列表中具有应用程序的捆绑包ID(键为autonomousSingleAppModePermittedAppIDs.

You can enter and exit guided access mode from within your app. However, to do so the device has to be supervised, and have an MDM profile installed that has the app's bundle ID in the list of applications that can request guided access mode (the key is autonomousSingleAppModePermittedAppIDs.

完成后,要进入引导式访问,请执行以下操作:

Once that is done, to enter guided access you do this:

UIAccessibility.requestGuidedAccessSession(true){
    success in
    print("Request guided access success \(success)")
}

这篇关于如何以编程方式在iPhone上启用“引导访问"(信息亭模式)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆