Questions tagged [driverkit]

DriverKit is a device driver development framework for Apple's macOS and iPadOS operating systems, introduced with macOS 10.15 "Catalina" and later added to iPadOS in version 16.

General information

DriverKit is a device driver development framework for Apple's macOS operating system, introduced with macOS 10.15 "Catalina." It was later also added to iPadOS in version 16.

The DriverKit SDK is contained in Apple's Xcode IDE distribution (from version 11 onwards), and is used to build so-called "driver extensions" or "dext" which run in special privileged user space processes. These extensions are installed by apps using the system extensions mechanism.

The DriverKit SDK interfaces with the wider IOKit infrastructure, both in kernel and general user space.

Features

As of macOS 10.15, the following types of driver can be implemented using DriverKit:

As of macOS 10.15.4, the following types of driver can additionally be implemented:

macOS 11.3 added support for:

macOS 12 added APIs for:

iPadOS 16 supports:

  • USBDriverKit
  • PCIDriverKit (Thunderbolt)
  • AudioDriverKit

Relevant question topics

  • Questions about which driver technology is the correct one to for implementing a driver for a particular device. In addition to DriverKit, drivers on macOS may also be implemented using a kext (kernel extension) or as a regular user space process, depending on the underlying device technology (USB, PCI, Firewire, etc.), the type of device (storage, network, audio, display, etc.), and the macOS version(s) targeted.
  • Questions related to the process of building, code signing, and packaging dexts. There is some overlap with macos-system-extension tag, using both can be appropriate when talking about the installation/activation process and APIs.
  • Code-level questions for implementing DriverKit based drivers. Co-tag with hid, usb, pci, etc. as appropriate when discussing specific types of device.
  • Questions about interaction of DriverKit drivers with the rest of the system, be it kexts or user space (app) clients. This will typically overlap with the iokit tag.
102 questions
9
votes
1 answer

How to memory-map a PCI BAR using PCIDriverKit?

How to memory-map a PCI Base Address Register (BAR) from a PCIDriverKit driver (DEXT) to a userspace application? Memory-mapping from a driver extension to an application can be accomplished by implementing the IOUserClient::CopyClientMemoryForType…
vially
  • 1,516
  • 16
  • 22
6
votes
2 answers

macOS System Extension: Entitlements and Signing with Provisioning Profile

I have a macOS System Extension for a USB device driver. It works when I disable SIP and manually sign using my codesign identity (generated from my Apple ID using "security find-identity" from Terminal) - as described here:…
5
votes
1 answer

Apple DriverKit SDK Camera driver registration

I am new to the Apple DriverKit SDK an i am not clear about how register my device driver so it would be available as a Camera in the OS. Do i have to register a streaming function in the Start function of the IOService? I searched all over the…
Michael
  • 198
  • 7
5
votes
1 answer

How DriverKit driver notify application?

I know how to send data to DriverKit and get back some values, that is application calling IOConnectCallStructMethod() and driver fill the OSData in structureOutput from application. In my Application it is using IOConnectCallAsyncScalarMethod() and…
Vannes Yang
  • 141
  • 6
5
votes
1 answer

Migrating a codeless KEXT to a codeless DEXT

I am migrating a codeless KEXT to a codeless DEXT. I have watched the WWDC video and read much of the information on the Apple Developer site. The difficulty I am having is finding not what to do but how to get started. A nice tutorial with an…
GTAE86
  • 1,780
  • 3
  • 29
  • 39
5
votes
2 answers

How to Write a driverkit extension for Mac OS catalina

I am trying to write a driver kit extension for one of devices. I have not got Information on How to write a driverkit extension for mac os Catalina. The only Documentation which I got is DriverKit Reference:…
4
votes
2 answers

How to build a DEXT that works on both Big Sur and Monterey

We are facing a bit of a conundrum in our DriverKit extension development. We would like to build and debug on Monterey. This means that we need to use Xcode 13. We also need to support Big Sur. Unfortunately we haven't been able to build a DEXT…
4
votes
1 answer

macOS NetworkingDriverKit - How can I register multiple ethernet interfaces?

I have tried extending IOUserNetworkEthernet and calling RegisterEthernetInterface(). This works perfectly for one ethernet interface, though the driver crashes when RegisterEthernetInterface is called a second time (doesn't return an error code). I…
Jake Stewart
  • 63
  • 1
  • 5
4
votes
1 answer

How to get the entitlement "com.apple.developer.driverkit.userclient-access"?

We have requested all entitlements related DriverKit. What we got are…
Vannes Yang
  • 141
  • 6
4
votes
1 answer

How to create a IOUSBHostPipe::CompleteAsyncIO callback?

I am writing a SystemExtension to communicate with a usb-device. My initial plan is to create a class Transfer that allocates the necessary IOMemoryDescriptor, and then pass the interface that I want the Transfer class to communicate with. I would…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
4
votes
1 answer

Can I use STL in a DriverKit driver?

Can I use for example std::vector in DriverKit driver in macOs / XCode? DriverKit has some container class like OSArray https://developer.apple.com/documentation/driverkit/osarray?language=objc If I create a new "DriverKit driver" project and…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
4
votes
1 answer

Should I use IOKit or DriverKIt (or HIDDriverKit) to write driver for USB or Bluetooth multi-touch device in macOS?

I am planning to write driver for USB or Bluetooth multi-touch device similar to Apple Magic Trackpad or Logitech trackpad for Mac. The idea is that all macOS applications can use this multi-touch device. As the newly introduced DriverKit (or…
xbing6
  • 53
  • 6
4
votes
1 answer

How to set `com.apple.developer.driverkit.transport.usb` entitlement?

I am unsure about how to set the com.apple.developer.driverkit.transport.usb key in my dext entitlements file. The Info.plist file already contains the IOKitPersonalities dictionary, and reading about the com.apple.developer.driverkit.transport.usb…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
4
votes
2 answers

kIOReturnNotPermitted from IOServiceOpen connecting to SystemExtension IOService

I am trying to create a client connection to a SystemExtension IOService. I can see that my IOUserClient subclass is created (init() and Start(IOService*) is called), but the return code from IOServiceOpen returns kIOReturnNotPermitted. I am making…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
4
votes
1 answer

How do I go about writing a driver using IOKit/DriverKit for MT6320 on an Azure Sphere Kit from MSFT?

Where are the step-by-step instructions to write a generic driver to a USB-connected developer board for MacOS using IOKit/DriverKit (publicly shown in WWDC 2019) in Xcode?
1
2 3 4 5 6 7