macOS: IOKit framework location corrected.#120
Conversation
|
thanks for your PR seems reasonable, but we have to take into account the fact that this has been working for years, and I don't recall any issues related to it
I can check only latest macOS 10.15 (Catalina): $ otool -L mac/.libs/libhidapi.0.dylib
mac/.libs/libhidapi.0.dylib:
/usr/local/lib/libhidapi.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1673.126.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)Secondly, I'm not sure we want to support macOS 10.5 and older (for the same reason we dropped support of Linux 2.x(something) earlier, and simpler would be just to link against |
|
Fixes #119 |
|
This fix actually fixed my problem in Mojave and Catalina. My app worked until put in a sandbox and signed with Hardened Runtime with the com.apple.security.device.usb entitlement. hid_enumerate put empty strings in the path field and I was not able to open anything. This was fixed when the path to dlopen was corrected. Just here to say thank you for this fix and to confirm that this fix has real world significance even though things seem to have been working for many many years. |
The referenced location of IOKit framework is wrong.
See https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html for details.