我正在尝试从我的应用程序启用/禁用引导访问。

这是我的代码:

NSLog(@"requesting guided access");
UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed) {
    if (didSucceed) {
        NSLog(@"entered guided access");
    }
    else {
        NSLog(@"failed to enter guided access");
    }
});

总是得到 didSucceed =否

不知道是什么问题

还有什么要做的吗?

我需要MDM配置文件或其他任何东西吗???

提前致谢

最佳答案

这就是启用单应用程序模式的方式。但是,为此,必须对设备进行监督,并安装MDM概要文件,该概要文件在可以请求引导访问模式的应用程序列表中具有应用程序的捆绑包ID,密钥为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 - 以编程方式启用/禁用引导访问 objective-c ?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35151781/

10-13 04:07