I've scheduled HIDManager on main thread (runLoop) using IOHIDManagerScheduleWithRunLoop. So, I get the device matching & removal callbacks on main thread.
But, I've scheduled a device IOHIDDeviceScheduleWithRunLoop on a different thread, Say Thread-1. According to the documentation it, When I set a report, I should receive a callback on the Thread-1 RunLoop.
IOHIDDeviceScheduleWithRunLoop( inIOHIDDeviceRef, CFRunLoopGetCurrent( ), kCFRunLoopDefaultMode );
But, I am recieving the HIDReport callback on the main thread. Any help ?
UPDATE:
I see the report callback is getting called even If I removed IOHIDDeviceScheduleWithRunLoop. The report callback supposed to be called on the device RunLoop.
According to the documentation of IOHIDManagerScheduleWithRunLoop , "This formally associates the HID Manager with the client's run loop. This schedule will propagate to all HID devices that are currently enumerated and to new HID devices as they are matched by the HID Manager"
This should be used only for matching and removal, But I am getting for input reports too.