I am trying for for Single App mode for one of my App using "Meraki" MDM, registered the device on the MDM site and created the profile.
I am using below code as suggested in this site, the code works fine on simulator but not on iPad."UIAccessibilityRequestGuidedAccessSession" is not fired. Can someone help me what I am missing here.
NSLog(@"requesting guided access");
UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL 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];
}
});