<!--
{
  "availability" : [
    "DriverKit: 19.0.0 -",
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "DriverKit"
  },
  "title" : "DriverKit"
}
-->

# DriverKit

Develop device drivers that run in user space.

## Overview

The DriverKit framework defines the fundamental behaviors for device drivers in macOS and iPadOS. The C++ classes of this framework define your 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. Other frameworks, such as <doc://com.apple.documentation/documentation/USBDriverKit>, <doc://com.apple.documentation/documentation/HIDDriverKit>, <doc://com.apple.documentation/documentation/NetworkingDriverKit>, <doc://com.apple.documentation/documentation/PCIDriverKit>, <doc://com.apple.documentation/documentation/SerialDriverKit>, and <doc://com.apple.documentation/documentation/AudioDriverKit>, provide the specific behaviors you need to support different types of devices.

The drivers you build with DriverKit run in user space, rather than as kernel extensions, which improves system stability and security. You create your driver as an app extension and deliver it inside your existing app.

In macOS, use the <doc://com.apple.documentation/documentation/SystemExtensions> framework to install and upgrade your driver. In iPadOS, the system automatically discovers and upgrades drivers along with their host apps.

> Note:
> 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 <doc://com.apple.documentation/documentation/USBDriverKit> and <doc://com.apple.documentation/documentation/AudioDriverKit> varies by platform.

## Topics

### Essentials

  <doc://com.apple.documentation/documentation/kernel/implementing_drivers_system_extensions_and_kexts>

[Creating drivers for iPadOS](/documentation/DriverKit/creating-drivers-for-ipados)

Bring your drivers to iPadOS by using the platform’s DriverKit support.

### Entitlements

[Requesting Entitlements for DriverKit Development](/documentation/DriverKit/requesting-entitlements-for-driverkit-development)

Request the entitlement for DriverKit development, and request other entitlements your driver needs to interact with specific devices and interfaces.

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.driverkit>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.driverkit.userclient-access>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.driverkit.allow-any-userclient-access>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.driverkit.communicates-with-drivers>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.driverkit.allow-third-party-userclients>

### Samples

[DriverKit sample code](/documentation/DriverKit/driverkit-sample-code)

Explore projects that demonstrate how to write macOS device drivers with the DriverKit family of frameworks.

### Services

[Creating a Driver Using the DriverKit SDK](/documentation/DriverKit/creating-a-driver-using-the-driverkit-sdk)

Create a driver that supports proprietary features of your company’s hardware devices.

[Debugging and testing system extensions](/documentation/DriverKit/debugging-and-testing-system-extensions)

Debug your system extensions by temporarily disabling the security checks that macOS performs during the installation process.

[`class IOService;`](/documentation/DriverKit/IOService)

The base class for managing the setup and registration of your driver.

### Event management

[`class IODispatchQueue;`](/documentation/DriverKit/IODispatchQueue)

An object that manages the serial execution of blocks.

[`class IOInterruptDispatchSource;`](/documentation/DriverKit/IOInterruptDispatchSource)

A dispatch source that reports hardware-related interrupt events to your driver.

[`class IOTimerDispatchSource;`](/documentation/DriverKit/IOTimerDispatchSource)

A dispatch source that notifies your driver at a specific time.

[`class IODataQueueDispatchSource;`](/documentation/DriverKit/IODataQueueDispatchSource)

A dispatch source that manages a shared-memory data queue.

[`class IODispatchSource;`](/documentation/DriverKit/IODispatchSource)

The common base class for dispatch sources.

[`class OSAction;`](/documentation/DriverKit/OSAction)

An object that executes your driver’s custom behavior.

### Memory management

[`class IOBufferMemoryDescriptor;`](/documentation/DriverKit/IOBufferMemoryDescriptor)

A memory buffer allocated in the caller’s address space.

[`class IOMemoryDescriptor;`](/documentation/DriverKit/IOMemoryDescriptor)

The base class for describing a location in memory.

[`class IOMemoryMap;`](/documentation/DriverKit/IOMemoryMap)

A reference to an existing block of memory in the current process or in a different process.

[Memory Utilities](/documentation/DriverKit/memory-utilities)

Allocate and deallocate memory and manage memory pointers in different address spaces.

### Registry data types

[`class OSArray;`](/documentation/DriverKit/OSArray)

A container for an ordered, random-access collection of objects.

[`class OSDictionary;`](/documentation/DriverKit/OSDictionary)

A container for a collection with elements that are key-value pairs.

[`class OSBoolean;`](/documentation/DriverKit/OSBoolean)

A container for a true or false value.

[`class OSData;`](/documentation/DriverKit/OSData)

A container for untyped data.

[`class OSNumber;`](/documentation/DriverKit/OSNumber)

A container for an integer value.

[`class OSString;`](/documentation/DriverKit/OSString)

A container for managing an array of characters.

[`class OSSerialization;`](/documentation/DriverKit/OSSerialization)

A container for one or more objects, serialized in a binary data format that is suitable for messaging.

[`class OSCollection;`](/documentation/DriverKit/OSCollection)

The base class for DriverKit collection objects.

[`class OSContainer;`](/documentation/DriverKit/OSContainer)

The base class for DriverKit data objects.

[`class OSObject;`](/documentation/DriverKit/OSObject)

The base class for DriverKit objects

[`typedef OSString OSSymbol;`](/documentation/DriverKit/OSSymbol)

A container for managing an array of characters.

[`typedef SInt32 IOFixed;`](/documentation/DriverKit/IOFixed)

A fixed-point number.

### External drivers

[`class IOUserClient;`](/documentation/DriverKit/IOUserClient)

A connection to another service that the system manages.

[`class IOUserServer;`](/documentation/DriverKit/IOUserServer)

A system-managed service.

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.driverkit.userclient-access>

[Communicating between a DriverKit extension and a client app](/documentation/DriverKit/communicating-between-a-driverkit-extension-and-a-client-app)

Send and receive different kinds of data securely by validating inputs and asynchronously by storing and using a callback.

### Runtime support

[`#define OSDynamicCast(type, inst)`](/documentation/DriverKit/OSDynamicCast)

Casts an object safely to the specified type, if possible.

[`#define OSRequiredCast(type, inst)`](/documentation/DriverKit/OSRequiredCast)

Casts the object to the specified type, stopping the process if the object isn’t of the correct type.

[`#define IMPL(classname, name)`](/documentation/DriverKit/IMPL)

Tells the system that the superclass implementation of this method runs in the kernel.

[`#define TYPE(p)`](/documentation/DriverKit/TYPE)

Annotates a method declaration to indicate that it conforms to an existing method signature.

[`#define QUEUENAME(name)`](/documentation/DriverKit/QUEUENAME)

Tells the system to execute a method on the dispatch queue with the specified name.

[`#define SUPERDISPATCH`](/documentation/DriverKit/SUPERDISPATCH)

Tells the system to execute the superclass’ implementation of the current method in the kernel.

[`#define IIG_KERNEL`](/documentation/DriverKit/IIG_KERNEL)

Tells the system that the class or method runs inside the kernel.

[`#define LOCAL`](/documentation/DriverKit/LOCAL)

Tells the system that the method runs locally in the driver extension’s process space.

[`#define LOCALONLY`](/documentation/DriverKit/LOCALONLY)

Tells the system that the class or method runs locally in the driver extension’s process space.

[Error Codes](/documentation/DriverKit/error-codes)

Determine the reason an operation fails.

[C++ Runtime Support](/documentation/DriverKit/c-runtime-support)

Examine low-level types that DriverKit uses to support kernel-level operations.

### Classes

[`class IOHistogramReporter;`](/documentation/DriverKit/IOHistogramReporter)

[`class IOReportLegend;`](/documentation/DriverKit/IOReportLegend)

[`class IOReporter;`](/documentation/DriverKit/IOReporter)

[`class IOServiceStateNotificationDispatchSource;`](/documentation/DriverKit/IOServiceStateNotificationDispatchSource)

[`class IOSimpleReporter;`](/documentation/DriverKit/IOSimpleReporter)

[`class IOStateReporter;`](/documentation/DriverKit/IOStateReporter)

[`class OSBundle;`](/documentation/DriverKit/OSBundle)

[`class OSMappedFile;`](/documentation/DriverKit/OSMappedFile)

### Reference

[DriverKit Structures](/documentation/DriverKit/driverkit-structures)

[DriverKit Enumerations](/documentation/DriverKit/driverkit-enumerations)

[DriverKit Constants](/documentation/DriverKit/driverkit-constants)

[DriverKit Functions](/documentation/DriverKit/driverkit-functions)

[DriverKit Data Types](/documentation/DriverKit/driverkit-data-types)

[DriverKit Namespaces](/documentation/DriverKit/driverkit-namespaces)

### Macros

[Macros](/documentation/DriverKit/DriverKit-macros)

### Classes

[`class IOEventLink;`](/documentation/DriverKit/IOEventLink)

[`class IOExtensiblePaniclog;`](/documentation/DriverKit/IOExtensiblePaniclog)

[`class IOWorkGroup;`](/documentation/DriverKit/IOWorkGroup)

### Structures

[`typedef struct { ... } IONamedValue;`](/documentation/DriverKit/IONamedValue)

[`typedef struct { ... } IOPhysicalRange;`](/documentation/DriverKit/IOPhysicalRange)

[`typedef struct { ... } IOVirtualRange;`](/documentation/DriverKit/IOVirtualRange)

### Functions

[`kern_return_t IOSysCtlByName(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);`](/documentation/DriverKit/IOSysCtlByName)

[`pid_t getpid();`](/documentation/DriverKit/getpid)

### Macros

[`#define IOKIT`](/documentation/DriverKit/IOKIT)

[`#define IOPhysSize`](/documentation/DriverKit/IOPhysSize)

[`#define IOPhysical32(hi, lo)`](/documentation/DriverKit/IOPhysical32)

[`#define IO_NULL_VM_TASK`](/documentation/DriverKit/IO_NULL_VM_TASK)

[`#define IO_OBJECT_NULL`](/documentation/DriverKit/IO_OBJECT_NULL)

[`#define PRIIOByteCount`](/documentation/DriverKit/PRIIOByteCount)

[`#define SERIALIZABLE`](/documentation/DriverKit/SERIALIZABLE)

[`#define kIOConfigOrderKey`](/documentation/DriverKit/kIOConfigOrderKey)

[`#define kIOPropertyHashTypeKey`](/documentation/DriverKit/kIOPropertyHashTypeKey)

[`#define kIOPropertySHA3256Key`](/documentation/DriverKit/kIOPropertySHA3256Key)

[`#define kIOPropertySHA3384Key`](/documentation/DriverKit/kIOPropertySHA3384Key)

[`#define kIOPropertySHA3512Key`](/documentation/DriverKit/kIOPropertySHA3512Key)

[`#define kIOUserPlatformFunctionHandlerGet`](/documentation/DriverKit/kIOUserPlatformFunctionHandlerGet)

[`#define kIOUserResourcesSetPropertyKey`](/documentation/DriverKit/kIOUserResourcesSetPropertyKey)

[`#define kIOUserServrMaxExitReasonLength`](/documentation/DriverKit/kIOUserServrMaxExitReasonLength)

[`#define kIOUserServrMaxModulePathLength`](/documentation/DriverKit/kIOUserServrMaxModulePathLength)

[`#define kIOUserServrMaxPanicReasonLength`](/documentation/DriverKit/kIOUserServrMaxPanicReasonLength)

[`#define queue_extend_first(dst, src, type, field)`](/documentation/DriverKit/queue_extend_first)

[`#define queue_extend_last(dst, src, type, field)`](/documentation/DriverKit/queue_extend_last)

### Enumeration Cases

[`kIOConnectMethodVarOutputSize`](/documentation/DriverKit/kIOConnectMethodVarOutputSize)

[`kIOEventLinkAssociateCurrentThread`](/documentation/DriverKit/kIOEventLinkAssociateCurrentThread)

[`kIOEventLinkAssociateOnWait`](/documentation/DriverKit/kIOEventLinkAssociateOnWait)

[`kIOEventLinkClockMachAbsoluteTime`](/documentation/DriverKit/kIOEventLinkClockMachAbsoluteTime)

[`kIOEventLinkMaxNameLength`](/documentation/DriverKit/kIOEventLinkMaxNameLength)

[`kIOExtensiblePaniclogOptionsNone`](/documentation/DriverKit/kIOExtensiblePaniclogOptionsNone)

[`kIOExtensiblePaniclogOptionsWithBuffer`](/documentation/DriverKit/kIOExtensiblePaniclogOptionsWithBuffer)

[`kIOMemoryMapCacheModePostedCombinedReordered`](/documentation/DriverKit/kIOMemoryMapCacheModePostedCombinedReordered)

[`kIORPCMessageDeepSerialization`](/documentation/DriverKit/kIORPCMessageDeepSerialization)

[`kIOServicePMAssertionCPUBit`](/documentation/DriverKit/kIOServicePMAssertionCPUBit)

kIOServicePMAssertionCPUBit
When set, PM kernel will prefer to leave the CPU and core hardware
running in “Dark Wake” state, instead of sleeping.

[`kIOServicePMAssertionForceFullWakeupBit`](/documentation/DriverKit/kIOServicePMAssertionForceFullWakeupBit)

kIOServicePMAssertionForceFullWakeupBit
When set, the system will immediately do a full wakeup after going to sleep.

[`kIOServicePowerCapabilityLPW`](/documentation/DriverKit/kIOServicePowerCapabilityLPW)

[`kIOWorkGroupMaxNameLength`](/documentation/DriverKit/kIOWorkGroupMaxNameLength)

[`kSCSICmd_ATA_PASS_THROUGH`](/documentation/DriverKit/kSCSICmd_ATA_PASS_THROUGH)

[`kSCSICmd_ATA_PASS_THROUGH_EXT`](/documentation/DriverKit/kSCSICmd_ATA_PASS_THROUGH_EXT)

[`kTickScale`](/documentation/DriverKit/kTickScale)

### Type Aliases

[`typedef IOVirtualRange IOAddressRange;`](/documentation/DriverKit/IOAddressRange)

[`typedef unsigned int IOAlignment;`](/documentation/DriverKit/IOAlignment)

[`typedef unsigned int IODeviceNumber;`](/documentation/DriverKit/IODeviceNumber)

[`typedef IOVirtualAddress IOLogicalAddress;`](/documentation/DriverKit/IOLogicalAddress)

[`typedef int (^)(unsigned long long, class OSObject **) OSSerializationPortCopyInHandler;`](/documentation/DriverKit/OSSerializationPortCopyInHandler)

[`typedef int (^)(class OSObject *, unsigned long long *) OSSerializationPortCopyOutHandler;`](/documentation/DriverKit/OSSerializationPortCopyOutHandler)

[`typedef io_object_t io_connect_t;`](/documentation/DriverKit/io_connect_t)

[`typedef io_object_t io_enumerator_t;`](/documentation/DriverKit/io_enumerator_t)

[`typedef io_object_t io_ident_t;`](/documentation/DriverKit/io_ident_t)

[`typedef io_object_t io_iterator_t;`](/documentation/DriverKit/io_iterator_t)

[`typedef mach_port_t io_object_t;`](/documentation/DriverKit/io_object_t)

[`typedef io_object_t io_registry_entry_t;`](/documentation/DriverKit/io_registry_entry_t)

[`typedef io_object_t io_service_t;`](/documentation/DriverKit/io_service_t)

[`typedef int32_t pid_t;`](/documentation/DriverKit/pid_t)

[`typedef io_object_t uext_object_t;`](/documentation/DriverKit/uext_object_t)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)