516 questions
0
votes
1
answer
39
views
Mac Catalyst (MAUI): IOHID InputReportCallback not firing, IOUSBInterfaceOpen returns kIOReturnNotPermitted (0xe00002e2) for custom HID device
I am developing a .NET MAUI Mac Catalyst app (sandboxed) that communicates with a custom vendor-specific HID USB device.
Within the Catalyst app, I’m using a native iOS library (built with Objective-C ...
0
votes
0
answers
62
views
Stopping keyboard event propagation with IOKit
I am writing a program for MacOs to generate midi commands from key strokes on a computer keyboard. After identifying the device and sending the midi command to a client, I would like to prevent the ...
0
votes
1
answer
217
views
Trying to get IOKit working on XCode on the Mac [duplicate]
I am trying to use the IOKit power management functions for keeping the screen on. However there is something wrong as I am getting linker errors. What I have done is:
In Build Settings -> Search ...
0
votes
1
answer
185
views
Controlling a USB Scanner from macOS Swift app
I am trying to connect to and initiate a USB scanner from my macOS swift app so that I can capture the scanned image. I can detect the USB device successfully and match it with the expected productID ...
2
votes
1
answer
159
views
How do you create a custom OSObject subclass in a DriverKit driver?
In my DriverKit driver, I'd like to create a custom class that inherits from OSObject so that I can store it in an OSArray (and other OSObject derived collections).
The documentation for kexts and ...
3
votes
0
answers
294
views
Unable to import IOKit in an iOS framework
I've written a DriverKit driver for iPadOS for a USB device. It's working fine. I'm trying to package up the app-side code in an SDK for it in a framework. The framework includes both Swift and C/...
0
votes
0
answers
51
views
Issue retrieving buffer from the device on a custom device driver in MacOS
I am writing a custom device driver for a USB device which is quite old. The driver is written on the basis on Sample code given by Apple for IOKit. I am able to do communication to the device and I ...
1
vote
1
answer
114
views
Linker error with c file and .h header file
I have an Xcode project where I am using C to handle a low level task so I created the C file and the bridging header. However, I am getting a linker error when I try to build my project: "...
0
votes
1
answer
973
views
Unloading a kext after macOS 11 Big Sur
The Apple Developer article Installing a Custom Kernel Extension
states:
Unloading a kext on macOS 11 and later requires a call to kmutil or kextunload, followed by a system reboot. The kmutil tool ...
1
vote
1
answer
267
views
Connection between client and DriverKit in Xcode
In a Xcode project (macOS app), I'm using the DriverKit(and HIDDriverKit) framework. I have encountered a problem in the connection between the client app and the driver, which is implemented by the &...
3
votes
0
answers
265
views
Unable to Establish Connection to DriverKit System Extension from App
I am currently developing a macOS application that involves communication with a System Extension (DEXT) created using DriverKit. Despite the extension appearing to be correctly installed and ...
1
vote
0
answers
605
views
How to get a display name from CGDirectDisplayID in C or C++, without Objective-C or Swift? (For the latest macOS Ventura.)
I'm trying to get a display name from CGDirectDisplayID in pure C++ (or C.)
I can do it in Objective-C++, similar to this:
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics....
3
votes
1
answer
440
views
PCIE DriverKit cannot be loaded correctly due to entitlements issues
My question
I already have the correct entitlements, provisioning profile and development certification, and I have turned off SIP, turned on systemextensions developer on, but it still shows
provider ...
2
votes
1
answer
506
views
How To Remove a Property From an IORegistryEntry (From User Space)
I'm trying to remove a key-value-pair from the property table of an IORegistryEntry, but I just can't figure out how. I can use IORegistryEntrySetCFProperty() or IORegistryEntrySetCFProperties() to ...
1
vote
1
answer
256
views
Is it possible to get file system type and disk mount path by BSD name using only IO Registry?
I'm aware that it's possible to find the file system type (apfs, hfs, msdos etc.) and also the disks's mount path by disk's BSD name using the Disk Arbitration framework and also the POSIX statfs() ...
1
vote
1
answer
245
views
How to register a key in the IORegistry and react to its change in the kext?
I am studying kext development. I'm trying to implement a simple "generic" kext that would publish a key in the IORegistry and react to its changes then.
The class is quite trivial, it just ...
1
vote
1
answer
962
views
Unable to locate IOKit header files on macOS Ventura
I am attempting to fetch hardware information on macOS using IOKit FFI bindings in rust. I am on a apple silicon machine running macOS 13.1, apple clang 14.0.0, xcode 14.2, and command line tools 14.2....
1
vote
1
answer
341
views
MacOS custom Audio Driver doesn't process our hardware audio stream
We are developing a custom audio driver for a USB microphone in order to do simple processing (EQs) on the input audio stream (comparable to an APO for Windows). Our code is based on the ...
3
votes
1
answer
362
views
MacOS custom Audio Driver doesn't override the default Driver
We are developing a custom audio driver for a USB microphone in order to do simple processing (EQs) on the input audio stream (comparable to an APO for Windows).
After some help, we managed to assign ...
1
vote
1
answer
464
views
how to setup IOServiceAddMatching for different product identifications
need to use IOServiceAddMatchingNotification routine for supporing multiple product identifications.
To show the concept, I got part of this code from a site and revised it.Kept it short.
// Set up ...
1
vote
1
answer
479
views
How to fill up an IOBufferMemoryDescriptor with data
I'm using DriverKit in my iPadOS.
I'm trying to create a IOBufferMemoryDescriptor and add the data I've got in an OSData object.
I'm creating the IOBufferMemoryDescriptor with:
ret = ivars->...
1
vote
1
answer
311
views
How can I use USBmakebmRequestType with DriverKit
I'm building a driver in C++ for my iPad using DriverKit.
I'm trying to make a request to a control endpoint, so I'm trying to use IOUSBHostInterface::DeviceRequest(). For the first parameter, ...
2
votes
1
answer
741
views
How to programmatically find mount/eject usb device on macOS?
I am trying to unmount/eject usb device programmatically on macOS.
Using IOkit I tried to register to IOServiceMatching(kIOUSBInterfaceClassName) and iterate over all devices and for each device i ...
2
votes
1
answer
324
views
IOUserClientMethodArguments completion value is always NULL
I'm trying to use IOConnectCallAsyncStructMethod in order set a callback between a client and a driver in DriverKit for iPadOS.
This is how I call IOConnectCallAsyncStructMethod
ret = ...
2
votes
2
answers
918
views
What is the best way to get BSD drive names on macOS (Swift)?
What's the best way I can get a list of BSD names of all USB devices (and maybe including internal Mac drives) without using a diskutil CLI wrapper?
I don't want to use any wrappers that interact with ...