Skip to content

macOS: location of IOKit.framework #119

@0xDP

Description

@0xDP

Hi there,

according to

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html

IOKit.framework is located at "/System/Library/Frameworks/", but mac/hid.c:hidapi_IOHIDDeviceGetService() tries to find it at "/System/Library/".

--- a/hidapi/mac/hid.c
+++ b/hidapi/mac/hid.c
@@ -305,7 +305,7 @@ static io_service_t hidapi_IOHIDDeviceGe
 	 * and the fallback method will be used.
 	 */
 	if (iokit_framework == NULL) {
-		iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY);
+		iokit_framework = dlopen("/System/Library/Frameworks/IOKit.framework/IOKit", RTLD_LAZY);
 
 		if (iokit_framework != NULL)
 			dynamic_IOHIDDeviceGetService = (dynamic_IOHIDDeviceGetService_t) dlsym(iokit_framework, "IOHIDDeviceGetService");

Regards,
Dennis

Metadata

Metadata

Assignees

No one assigned

    Labels

    macOSRelated to macOS backend

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions