Building SimpleAudioDriver example

Hi there,

I am trying to build the Apple SimpleAudioDriver example but fail with codesign and/or provisioning.

I would be ok for now with the local option, but XCode 16.4 doesn't show the option "build to run locally" (SIP is disabled). When using "Automatically manage signing" it ends in a "Please file a bug report".

I found that having two different development teams tripped it up, so I deleted all certificates and keys and made sure to be only signed into one account in Xcode.

Can anyone give advice? Thanks a ton!

Here is the URL to the sample: https://developer.apple.com/documentation/coreaudio/building-an-audio-server-plug-in-and-driver-extension

macOS: 15.6.1 XCode: 16.4 Hardware: MacBook Pro M2 Max SIP: disabled

look in ~/Library/Developer/Xcode/UserData/Provisioning Profiles for the Xcode-generated profile. You can use QuickLook to inspect the profile. If you added the DriverKit USB (development) Capability, your profile should have idVendor='*'. This wildcard value will only work for development builds.

Your entitlements.plist should have an entry called com.apple.developer.driverkit.transport.usb or "DriverKit USB Transport' which is an array, containing one or more items, each of which is a dictionary. Each dictionary should have an item with key idVendor and value a decimal number equal to the vendor ID of the device you're driving.

Can anyone give advice? Thanks a ton!

Unfortunately, this is actually the first time I've looked at "Building an Audio Server Plug-in and Driver Extension" and, to be honest, that is not great sample code. Using darwinup in a shell script is not something any one should actually "do". I've already filed a bug on this (r.163226098), but you're going to need to do a bit of work to end up with something "reasonable".

SO, what I would actually suggest is the following:

  1. Start with the sample "Communicating between a DriverKit extension and a client app" and get it building and running. That's our simplest sample and will let you sort out the basic build and install process.

  2. Once that's working, replace the DEXT inside that sample with the DEXT from "Building an Audio Server Plug-in and Driver Extension".

Once that's done, you'll have an installer app with an embedded DEXT, which is what ALL DEXT need to be shipped as anyway.

Shifting to the codesign front:

I would be ok for now with the local option, but XCode 16.4 doesn't show the option "build to run locally" (SIP is disabled).

The old "disable SIP" process is no longer necessary. The "modern" approach uses the "Development Only" entitlement variants, which allow your DEXT to match against "any" hardware, but can ONLY be used in Development builds. Those use this configuration described above:

If you added the DriverKit USB (development) Capability, your profile should have idVendor='*'. This wildcard value will only work for development builds.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Building SimpleAudioDriver example
 
 
Q