Managed Managed Access from an Application

We have an app with an assessment module where we conduct an objective type test. We do not want the user to switch between applications for cheating. We are currently rejecting the test when the app goes to the background.

In iOS 6, Apple introduced a new feature called โ€œManaged Access,โ€ and Iโ€™m injured if we can control it using the Objective-C code snippet.

+4
source share
1 answer

Recently, I have faced the same situation. There seems to be no way to enable or run managed access from object code c. However, you can check with the help in object c whether managed access is enabled or not UIAccessibilityIsGuidedAccessEnabled ()

It returns YES if managed access is enabled. Thus, you can only allow the user to give a test when managed access is enabled.

If you want to know when managed access is enabled or disabled, you need to configure something like this:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(guidedAccessChanged) name:UIAccessibilityGuidedAccessStatusDidChangeNotification object:nil]; 

You can read more about this here:

UIAccessibilityIsGuidedAccessEnabled

UIAccessibilityGuidedAccessStatusDidChangeNotification

+2
source

Source: https://habr.com/ru/post/1434551/


All Articles