macos 13.3 get usb hid device, interface is 0, is not right

when I upgrade my mac os to version 13.3. I found the usb device interface number is always 0(error ,the right is non-0) when I use kUSBInterfaceNumber from hidapi library(https://github.com/libusb/hidapi). is anyone cause this problem .who can help me. thank you .

static int32_t get_int_property(IOHIDDeviceRef device, CFStringRef key) { CFTypeRef ref; int32_t value;

ref = IOHIDDeviceGetProperty(device, key);
if (ref) {
    if (CFGetTypeID(ref) == CFNumberGetTypeID()) {
        CFNumberGetValue((CFNumberRef) ref, kCFNumberSInt32Type, &value);
        return value;
    }
    else {
        printf("\nCFGetTypeID not equal!\n");
    }
}
else {
    printf("\nref=%p\n",ref);

}
return 0;

}

    cur_dev->interface_number =
        get_int_property(dev, CFSTR(kUSBInterfaceNumber));

Same problem here. I have a compound USB device which has 3 USB interfaces. I configure the 3 interfaces with interface-number 3,4and5 respectively on device firmware. When connected with a macbook as a host, I enumerate all components of the device. Everything works fine until I updated to Mac os 13.3. I can still get 3 devices but get_int_property(dev, CFSTR(kUSBInterfaceNumber)) always return 0.

Anyone got same issue with me and any ideas?

macos 13.3 get usb hid device, interface is 0, is not right
 
 
Q