Skip to content

Commit

Permalink
Fix crashing of OS X apps on 10.8 and earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBuckley committed Apr 12, 2014
1 parent e4397c6 commit 62adc68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AccessibilityCheckCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ + (BOOL) accessibilitySeemsToBeTurnedOn {

#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1090

extern Boolean AXIsProcessTrustedWithOptions(CFDictionaryRef options);
extern CFStringRef kAXTrustedCheckOptionPrompt;
extern Boolean AXIsProcessTrustedWithOptions(CFDictionaryRef options) __attribute__((weak_import));
extern CFStringRef kAXTrustedCheckOptionPrompt __attribute__((weak_import));

#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 1090

+ (BOOL) accessibilitySeemsToBeTurnedOn {
BOOL returnValue = NO;

if (AXIsProcessTrusted != NULL)
if (AXIsProcessTrustedWithOptions != NULL)
{
NSDictionary* options = @{ (id) kAXTrustedCheckOptionPrompt : @YES };
return AXIsProcessTrustedWithOptions((CFDictionaryRef) options);
Expand Down

0 comments on commit 62adc68

Please sign in to comment.