Question
How do I automate Guided Access mode on an iPhone? I will need to automate the enabling and removal of this feature
Backgr
You can enter and exit guided access mode from within your app. However, to do so the device has to be supervised, and have an MDM profile installed that has the app's bundle ID in the list of applications that can request guided access mode (the key is autonomousSingleAppModePermittedAppIDs.
Once that is done, to enter guided access you do this:
UIAccessibility.requestGuidedAccessSession(true){
success in
print("Request guided access success \(success)")
}