3
votes

I am working in Cocoa.

I have made changes to my application as per the answer recommended by link

I have following questions:

  1. Can I add my app to System Accessibility List programmatically after taking users consent, so that it is seen checked in System Preferences > Security & Privacy > Privacy > Accessibility.(Like they do it in iOS where app requests user to show notifications, and user can choose between Dont allow and Ok).
  2. After the application is successfully added to the Accessibility list how do I get the value of checkbox in Accessibilty list programatically ?

I am expecting a sandbox/"app store" compatible answer

1
Might get more traction with this question on one of the apple lists. - Daniel Farrell

1 Answers

2
votes

You can have 1) done automatically by passing in kAXTrustedCheckOptionPrompt whilst querying 2) with AXIsProcessTrustedWithOptions:

NSDictionary *prompt = @{kAXTrustedCheckOptionPrompt:@YES};
BOOL accessible = AXIsProcessTrustedWithOptions((CFDictionaryRef)prompt);

This will provide whatever the current system standard dialog is for the user consenting to trust your app.