How can I grant my application "access privileges" after checking "Allow access for assistive devices"?

I have an application that uses a (completely friendly user) system hook for the whole system.

When the application starts, I check if the option "Enable access for assistive devices" is set, as another person set here: Programmatically determine whether "allow access for assistive devices" devices is enabled "is checked in the Cocoa application

My problem is that even after enabling access through this checkbox, the application continues to work without these privileges. How to grant (currently) privileges to the application and make it work with the keyboard? Do I need to restart the application?

+2
source share
1 answer

Looking at the link you posted,

I asked the Accessibility engineer again, and apparently you need to re-exec or re-launch the application, now vested with a new state, for it to take effect.

I would provide the user with a notification or message that the application needs to be restarted to enable auxiliary privileges, and then restarted.

+1
source

Source: https://habr.com/ru/post/894233/


All Articles