IOHIDCheckAccess(kIOHIDRequestTypeListenEvent) does not work

I have an app that needs Input Monitoring permissions to get keyboard access in the background. I've attempted to use both IOHIDCheckAccess(kIOHIDRequestTypeListenEvent) and IOHIDRequestAccess(kIOHIDRequestTypeListenEvent), but they always return denied, even though I have given the permission for Input Monitoring to the app in Settings.

Is there something I need to put in my Info.plist to enable this permission to work?

You need to add this in your info file:

    <key>NSInputMonitoringUsageDescription</key>
    <string>
        Your string here
    </string>
IOHIDCheckAccess(kIOHIDRequestTypeListenEvent) does not work
 
 
Q