I'm trying to use the Accessibility API and have this code:
NSDictionary *options = @{( id) kAXTrustedCheckOptionPrompt : @YES};
BOOL accessibilityEnabled = AXIsProcessTrustedWithOptions options);
It can work well, when I add my application to Accessibility list. But after I restart my application, It will lost permission and be removed from accessibility list automatic. How can I keep the permission of my app when I restart it? thanks!