如何在iPhone上以编程方式启用Guided Access(Kiosk模式)? [英] How can I programatically enable Guided Access (Kiosk mode) on an iPhone?

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

问题描述

问题

如何自动 iPhone上的Guided Access 模式?我需要自动启用和删除此功能

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.

如果我有这个或类似的应用程序的源代码,我可以在切换出临时Kiosk模式时需要密码,这样手机或(理想情况下)无法通过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:

UIAccessibilityRequestGuidedAccessSession(true){
    success in
    println("Request guided access success \(success)")
}

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

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