My app needs both Accessibility and Input Monitoring permissions. Accessibility works as expected - calling AXIsProcesstrusted() automatically adds the app to System Settings > Privacy & Security > Accessibility, and the user just needs to toggle it on.
Input Monitoring doesn't behave the same way. I'm calling CGRequestListenEventAccess() and creating a CGEvent.tapCreate(.listenOnly), but the app doesn't reliably appear in the Input Monitoring list. The user opens the pane and sees nothing to enable.
What I've tried:
CGRequestListenEventAccess()— shows the system prompt once per install, but doesn't always add the app to the listCGEvet.tapCreate(tsp: .cgSessionEventTap, place: .headInsertEventTap, options: listenOnly, ...)— returns nil before Accessibility is granted; after Accessibility is granted, the tap succeeds but the app still may not appear in the Input Monitoring list- Calling both after Accessibility is confirmed, with a delay before opening the Settings pane
The flow:
- User grants Accessibility (app appears automatically via
AXIsProcessTrusted()) - App creates a listen-only CGEventTap (succeeds)
- App opens
x-apple.systempreferences:com.apple.preferences.security?Privacy_ListenEvent - User sees the Input Monitoring pane but the app is not listed
Environment: macOS 15, signed and notarized app, correct bundle ID, Hardened Runtime with com.apple.security.device.audio-input-monitoring entitlement not set (not applicable).
Is there an API equivalent to AXIsProcessTrusted() that reliably registers an app in the Input Monitoring list? Or is there a specific entitlement, Info.plist key, or sequence of calls required on macOS 14+/15 to ensure the app appears?