"detect or react to guided access?" Code Answer


you want something like this:

nslog(@"accessabilitiy enabled: %@", uiaccessibilityisguidedaccessenabled() ? @"yes" : @"no");

if (!uiaccessibilityisguidedaccessenabled()) {
   // show something since i'm not in guided access

if you want to know when it changes...

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(guidedaccesschanged) name:uiaccessibilityguidedaccessstatusdidchangenotification object:nil];

then check to see if it is on or off as per the first test.

By Robert Karczmarczyk on July 13 2022
Only authorized users can answer the Search term. Please sign in first, or register a free account.