Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 以编程方式启用/禁用引导访问objective-c?_Ios_Objective C_Iphone - Fatal编程技术网

Ios 以编程方式启用/禁用引导访问objective-c?

Ios 以编程方式启用/禁用引导访问objective-c?,ios,objective-c,iphone,Ios,Objective C,Iphone,我正在尝试从我的应用程序启用/禁用引导访问 这是我的密码: NSLog(@"requesting guided access"); UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed) { if (didSucceed) { NSLog(@"entered guided access"); } else { NSLog(@"failed to enter guid

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

这是我的密码:

NSLog(@"requesting guided access");
UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed) {
    if (didSucceed) {
        NSLog(@"entered guided access");
    }
    else {
        NSLog(@"failed to enter guided access");
    }
});
始终获得成功=否

不知道是什么问题

还有别的事要做吗

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


提前感谢

这是启用单一应用模式的方式。但是,要执行此操作,必须对设备进行监控,并安装一个MDM配置文件,该配置文件在可请求引导访问模式的应用程序列表中包含应用程序的捆绑ID。密钥为
AutonomousSingleAppModePermitedAppID


是的,至少根据上的评论,您是这样做的。这里的评论是“您需要在MDM(移动设备管理)中启用单一应用模式。也就是说,您需要配置一个配置文件,并将您的应用程序的捆绑标识添加到“AutonomousSingleAppModePermitedAppIds”中。”但我现在不知道MDM以及如何添加捆绑标识。。你能一步一步地指导我吗我自己从来没有做过。