Input Monitoring authorization on MacOS Catalina

Hello,


I have a macOS application get libsystem_kernel exception on Mac 10.15, but it works well on Mac 10.14 or earlier version.

Application need to list USB HID devices, and it crash when it call IOHIDManagerCopyDevices.

If I manually enable ‘input monitoring’ privacy permission, then application can works normally.

I'm looking for a solution of requesting authorization for Input Monitoring, just like authorization for Media Capture.

https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos?language=objc


Thanks in advance and best regards.