On OS X 10.9 Mavericks, AXAPIEnabled() deprecated .
AXIsProcessTrustedWithOptions can be used instead:
NSDictionary *options = @{(id)kAXTrustedCheckOptionPrompt: @YES}; BOOL accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options);
If you switch to YES for kAXTrustedCheckOptionPrompt , the system will show the user a useful little dialog with a link to System Preferences:
"YourApp.app would like to control this computer with accessibility features."

pkamb source share