我正在尝试从我的应用程序启用/禁用引导式访问。
这是我的代码:
NSLog(@"requesting guided access");
UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed) {
if (didSucceed) {
NSLog(@"entered guided access");
}
else {
NSLog(@"failed to enter guided access");
}
});
总是得到 没有成功=否
不知道是什么问题
还有什么事情要做吗?
我需要 MDM 配置文件或其他任何东西吗???
提前致谢
最佳答案
这就是启用单应用程序模式的方式。但是,要做到这一点,设备必须受到监督,并且安装了 MDM 配置文件,该配置文件在可以请求引导访问模式的应用程序列表中具有应用程序的捆绑 ID, key 是 autonomousSingleAppModePermittedAppIDs
.
https://developer.apple.com/library/ios/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html
https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSAccessibility_Protocol_Reference/
关于ios - 以编程方式启用/禁用引导访问-c?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35151781/