DriverKit sample code
Explore projects that demonstrate how to write macOS device drivers with the DriverKit family of frameworks.
Overview
The DriverKit SDK provide a stable, secure platform on which to build device drivers for macOS and iPadOS. It provides the interfaces you need to support many types of hardware, including USB devices, HID devices, networking devices, audio devices, and more. Package your custom code in a DriverKit extension, which runs in user space and communicates with the kernel through the framework APIs. To install your DriverKit extension on macOS, deliver it inside an app and install it using the System Extensions framework. For projects that run on iPadOS, the system locates the driver in your app bundle and installs the driver for you.
The DriverKit SDK includes several practical examples that show you how to write a typical driver. Use these samples as a starting point to write your own custom drivers. The SDK’s classes provide the base code you need to support standard hardware protocols such as USB, HID, Ethernet, PCI, Thunderbolt, and more. Use your custom driver code to support proprietary features of your hardware devices.
Topics
Essentials
Audio samples
HID samples
Handling Stylus Input from a Human Interface DeviceHandling Keyboard Events from a Human Interface Device