1

I have a reactnative application, i want to check if the user enable or not the kiosk mode (Guided Access)

How we can check if user has enable Kiosk mode programmatically ?

I found nothing on the internet, Any help will be apprecied

tamtoum1987
  • 1,957
  • 3
  • 27
  • 56

1 Answers1

0

I add on didFinishLaunchingWithOptions [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(guidedAccessStatusChanged) name:UIAccessibilityGuidedAccessStatusDidChangeNotification object:nil];

-(void) guidedAccessStatusChanged {

if (UIAccessibilityIsGuidedAccessEnabled()) {
  [Connexion consumeCallBackCompoTrainEnableAccess : @"true"];
}  else {
  [Connexion consumeCallBackConduiteEnableAccess : @"false"];
  
} 

}

+ (void) consumeCallBackConduiteEnableAccess : (NSString *) hasAcess {

   if(callbackStockConduite != nil && callbackStockConsommedConduite == false && [hasAcess isEqualToString:@"false"]){

callbackStockConsommedConduite = true;
callbackStockConduite(@[hasAcess]);

}

}

This callbackStockConduite is used by reactnative

tamtoum1987
  • 1,957
  • 3
  • 27
  • 56