In earlier macOS versions AXIsProcessTrustedWithOptions with kAXTrustedCheckOptionPrompt = true showed the system alert (Open System Settings / Deny). It also added the app to the Accessibility list, so the user only had to turn on one switch.
On macOS 27.3 beta 2 (26C5047e) :
- No alert appears, and the app is not added to System & App Protection Override.
- The same happens with the new
kAXTrustedCheckOptionTargetBundleIdentifierkey, whether it is set to a bundle ID or tokAXTrustedCheckTargetAllApplications. - Once the user adds the app manually (Privacy & Security > System & App Protection Override → + → Choose Apps → A target set to Ask First), a targeted request on the first use of the API does show the "Allow ... to temporarily control ...?" alert. This prompt also appeared only for the first time & for the case where the user wants to grant access temporarily.
The only way to grant the permission for the entire system is to open Privacy & Security and talk the user through + (Add), finding the app, choosing an option, and confirming each dialog.
But the 27.3 SDK header AXUIElement.h still says the prompt option means
A CFBooleanRef indicating whether the user will be informed if the current process is untrusted. This could be used, for example, on application startup to always warn a user if accessibility is not enabled for the current process. Prompting occurs asynchronously and does not affect the return value.
I've filed FB25788262 for this.
But I had a few questions around this :
- Is the missing alert and list entry intentional for apps that are not assistive technologies, or is it a beta bug?
- If it's intentional, what is the supported way to onboard users? We could open the System & App Protection Override page through the URL :
x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibilitybut the user had to manually add the app. Is there a way where the app can be pre-selected or an app entry in the page be added automatically like earlier ? - Are the new
kAXTrustedCheckOptionTargetBundleIdentifierprompts meant to work only after the user has added the app themselves? And shouldkAXTrustedCheckTargetAllApplicationswith the prompt option ever show an alert? It doesn't for me, either before or after the app is added.