DriverKit Overview
replacement for IOKit device drivers
new way to extend the system that is more reliable and secure, running in userspace (no longer in the kernel)
these driver extensions, also known as dexts, are bundled in apps, and you can easily distribute your apps and drivers on the Mac App Store
support for:
Networking
Block Storage
Serial
Audio
USB
PCI
HID
SCSI controllers
SCSI Peripherals
AudioDriverKit updates
register a real-time callback
get a callback every time an IO operation happens
use for signal processing
// Declare a IOOperationHandler block to set on the IOUserAudioDevice.
// The block will be called from a real time context when a i/o operation
// occurs on the IOUserAudioStream buffers for the device.
io_operation = ^kern_return_t(IOUserAudioObjectID in_device,
IOUserAudioIOOperation in_io_operation,
uint32_t in_io_buffer_frame_size,
uint64_t in_sample_time,
uint64_t in_host_time)
{
// Add custom code to make modifications to the buffers as necessary
if (in_io_operation == IOUserAudioIOOperationWriteEnd) {
...
} else if (in_io_operation == IOUserAudioIOOperationBeginRead) {
...
}
return kIOReturnSuccess;
};
this->SetIOOperationHandler(io_operation);New entitlement (from macOS 12.1)
if your base target is earlier, use
com.apple.developer.driverkit.allow-any-userclient-accessif your base target is macOS 12.1 or later, use
com.apple.developer.driverkit.family.audiouse
com.apple.developer.driverkit.allow-any-userclient-accessif you want any app to be able to communicate with your driverall
com.apple.developer.driverkit.familyentitlements are now public for development: they no longer require you to file a requestrequest for distribution here
DriverKit on iPad
no changes required for existing macOS drivers to be ported to iPad
USBDriverKit, PCIDriverKit, AudioDriverKit support from iPadOS 16
requires M1 iPads
automatic discovery on iPadOS (must use SystemExtensions framework on macOS)
