Home > Wiki Tips

DriverKit on Mac: What Is It and How Does It Work?

Updated on Tuesday, December 3, 2024

Written by

Vain Rowe

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: This post from iBoysoft spells out what is DriverKit on a Mac and how to use it on a Mac computer. If you are curious about it, do not hesitate and click on this article for details and info right at this moment!

 

Before figuring out what is DriverKit on Mac and how it works, let's know the driver first. You must know something about the driver since you work with it frequently, which always acts as a bridge between the computer and the rest of the system. It is a collection of software-based services that communicate with a hardware device, including most USB devices, HID devices, PCI cards and devices, and devices with serial communication interfaces.

While the DriverKit on a Mac, in simple terms, is a framework that defines the movements happening in machine drivers. Follow us to learn more details about DriverKit on macOS devices.

What is DriverKit on Mac?

You might have heard of the DriverKit framework already or not, but that's not a big deal. Typically, the DriverKit Mac comes out in the form of _driverkit user Mac, which explains the fundamental behaviors of device drivers in macOS and iPadOS. The DriverKit Mac's C++ classes explain the driver's basic structure and provide support for handling events and allocating memory.

This framework also supports appropriate types for examining the numbers, strings, and other types of data in your driver's I/O registry entry.

The drivers you build with Mac DriverKit run in user space, yet not working as kernel extensions, which improves system stability and security.

In macOS machines, we always use the System Extensions framework to install and upgrade the drivers, while on iPadOS devices, the driver upgrades are performed by the system's automatic move along with the host apps.

The base DriverKit framework is available in macOS for Apple silicon and Intel-based Mac computers, and in iPadOS for devices with an M-series chip. The availability of family frameworks like USBDriverKit and AudioDriverKit varies by platform.

If you find this article informative, please leave your comment and share it with more people on social platforms!

 

Some common values of DriverKit on Mac to build drivers

Now that we have made DriverKit's definitions and working patterns clear, let's learn some common command lines used to build drivers. If you wanna build drivers by yourself, you can take them as references, or you can just have a quick look out of curiosity.

com.apple.developer.driverkit

A Boolean value that indicates whether your extension has permission to run as a user-space driver.

com.apple.developer.driverkit.userclient-access

An array of strings that represent macOS driver extensions that may communicate with other DriverKit services.

com.apple.developer.driverkit.allow-any-userclient-access

A Boolean value that determines whether a macOS driver accepts user client connections from any application.

com.apple.developer.driverkit.communicates-with-drivers

A Boolean value that indicates whether an iPadOS app can communicate with drivers.

com.apple.developer.driverkit.allow-third-party-userclients

A Boolean value that indicates whether an iPadOS driver accepts calls from third-party user clients.

com.apple.developer.driverkit.userclient-access

An array of strings that represent macOS driver extensions that may communicate with other DriverKit services.

Will DriverKit become popular?

Some users wonder whether DriverKit will be popular in the future since Apple requires drivers to migrate from IOKit to DriverKit and many types of IOKit drivers are no longer supported.

To tell the truth, DriverKit will be popular eventually since this move is mandatory by Apple, and moving the drivers and such from the kernel to userspace is closer to the original microkernel OS design Mach was intended for, rather than how they employed it in XNU.

DriverKit currently only supports certain types of devices. while kext is not completely deprecated. Support for other types of devices will be added in the future; in the meantime, those devices can continue to use kexts.

Conclusion

This post walks you through what is DriverKit on Mac and how it works in building drivers for your Mac computer. Besides, some common DriverKit-related command lines are provided for people who want to build drivers by themselves. If you have no interest in building a driver, you can just have a quick overview, however.