AXIsProcessTrustedWithOptions

1
2
3
NSDictionary *options = @{(id)kAXTrustedCheckOptionPrompt: @YES};
BOOL accessibilityEnabled =
AXIsProcessTrustedWithOptions((CFDictionaryRef)options);
1
2
3
let options:[NSString:NSNumber] = 
[String(kAXTrustedCheckOptionPrompt.takeRetainedValue()) as String:true]
let accessibilityEnabled = AXIsProcessTrustedWithOptions(options);