macOS: IOKit framework location corrected. #120
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!120
Loading…
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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
best case scenario, if we could test it on all versions of macOS starting with 10.6 and check how exactly does this work (before/after the change), not to accidentally cause some regressionsAny volunteers?After second though, no need - since we link against
IOKit.frameworkthis path is not relevant - dlopen would simply return a reference to already loaded library (by name)I can check only latest macOS 10.15 (Catalina):
It works as expected before AND after this patch -
IOKit.frameworkgets loaded just fineI almost sure, this is because libhidapi.dylib is linked against IOKit.statically for some reason:
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
IOKit.frameworkstatically, and don't do this dynamic load at alla second thought:
#121 will go for next release
let's have this one
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.