Skip to content

Instantly share code, notes, and snippets.

@nomeyer
Created February 26, 2016 14:05
Show Gist options
  • Save nomeyer/bcf24fabcb6ceff89ec0 to your computer and use it in GitHub Desktop.
Save nomeyer/bcf24fabcb6ceff89ec0 to your computer and use it in GitHub Desktop.
Prompt end user for accessibility permission, from http://devstreaming.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200.pdf
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { CFMutableDictionaryRef options = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionarySetValue(options, kAXTrustedCheckOptionPrompt, kCFBooleanTrue); AXIsProcessTrustedWithOptions(options); CFRelease(options); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment