我正在尝试通过此方法发送引导访问会话的请求:UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed)。为此,我在配置文件中添加了 singleAppMode 的键。但每次我只在这种方法中得到其他条件时,
UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed){
NSLog(@"did succeed =%d",didSucceed);
if (didSucceed) {
NSLog(@"entered guided access");
// self.inGuidedSessionMode = YES;
[[[UIAlertView alloc] initWithTitle:@"entered single access mode" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}
else {
NSLog(@"failed to enter guided access");
[[[UIAlertView alloc] initWithTitle:@"Unable to enter single access mode" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}
});
请给我进入成功模式的步骤吗?