0

I am trying to send request for Guided access session through this method: UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed). For this I added key for singleAppMode in config file. But every time i am getting else condition only in this method,

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];
    }

});

Can please give me steps for to enter into success mode?

Vaddi
  • 27
  • 6

1 Answers1

0

You need to Enable Guided Access from your device first through Setting - General - Accessibility - Guided Access

Jack Vo
  • 319
  • 2
  • 14