0

I am developing a .NET MAUI Mac Catalyst app (sandboxed) that communicates with a custom vendor-specific HID USB device. Within the Catalyst app, I’m using a native iOS library (built with Objective-C and IOKit) and calling into it via P/Invoke from C#. The HID communication layer relies on IOHIDManager and IOUSBInterface APIs. The device is correctly detected and opened using IOHIDManagerOpen(), and IOHIDDeviceSetReport() works — returning status = 0, meaning I can successfully send feature reports to the device. However, IOHIDDeviceRegisterInputReportCallback() never fires — I never receive input reports from the device.

To debug further, I tried calling low-level IOKit USB APIs directly (IOUSBInterfaceOpen() and IOUSBInterfaceOpenSeize()) from the same native library. Both fail with the following error code: kIOReturnNotPermitted (0xe00002e2)indicating access denied, even though the device enumerates and opens successfully in IOHIDManager.

What I’ve verified

  • Disabling sandboxing does not change the behavior (same access denied).
  • The device uses a vendor-specific usage page (not a standard HID).
  • I can successfully send reports, but cannot receive any input reports.
  • The same HID device works fine on Windows using the HIDSharp library (both input and output reports work correctly).
  • Tried polling queues but element input_Mis failed to add to queue.

Has anyone successfully used IOHID InputReport callbacks or IOUSBInterfaceOpen from a Mac Catalyst (MAUI) app to communicate with a custom HID device? Are there any additional entitlements or permission requirements to receive input reports under Catalyst? Or are these APIs currently restricted under the Catalyst runtime? Any insights from Apple engineers or others who have tried similar setups would be greatly appreciated. Thanks in advance!

My Current entitlements <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.device.bluetooth</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.files.bookmarks.app-scope</key> <true/> <key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix).com.org.app</string> </array> <key>com.apple.security.device.usb</key> <true/> <key>com.apple.security.device.hid</key> <true/> <key>com.apple.security.cs.allow-jit</key> <true/>

1 Answer 1

0

I have a Mac Catalyst app (built with Swift and UIKit) and HID access does work, so it's not a Catalyst restriction.

kIOReturnNotPermitted (0xe00002e2) usually indicates the lack of system's permission. Open system settings → Privacy & Security → Input Monitoring and make sure your app is enabled there. If your app is not listed, click the + at the bottom and add it.

The permission will apply after restarting the app. (Caution: if builds end up at a randomized temporary path, granted permissions won't apply to the new binary. So you might want to export the binary to a fixed location and test from there.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.