0

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];
    }
});
Raj
  • 1
  • 2

1 Answers1

1

This will only work if the device is supervised, which is done through Apple Configurator or the Apple Device Enrollment Program.

Sarah Elan
  • 2,465
  • 1
  • 23
  • 45