IOKit or DriverKit for userspace device access

Hi,


I'm looking for some clarification about the new DriverKit API for userspace device access in Catalina and above.


I have a userspace USBHID driver for a proprietary device that is implemented using IOKit's IOUSBDeviceInterface and IOHIDDeviceInterface to communicate with Apple's HID driver. As far as I can tell this API is still valid in 10.15+.


I see that in Catalina the new com.apple.driverkit.AppleUserUSBHostHIDDevice driver is loaded for the device. Our current IOKit based code doesn't work properly with the device on 10.15 and I'm trying to figure out if it needs to be ported to DriverKit.


Is the IOKit based code still the right way to access this device or does it need to be ported to DriverKit?


Glenn

Replies

In my project, we are using IOkit.framework to access device. Do I need to replece IOkit.framework with Driverkit.framework to support MacOSx10.16. In WWDC2019, Apple mensioned that DriverKit.framework is replacement for IOkit.framework.

Please confirm it.

WebUSB via Chrome on macOS Catalina, i.e. macOS 10.15.+, works fine with TSC "TTP-342E Pro".

You could search the source code of Chromium using IOKit with usb_device_mac.cc