SimpleAudioDriver sample, cannot install dext

Hi,

I'm a little newbie on MacOS but did audio development for many years on other systems. Now I started some development on MacOS and tried to get this SimpleAudioDriver sample running. Compilation works fine and when I try to install the dext I'm prompted for my credentials. Afterwards "systemextensionsctl list" shows the dext as enabled and active but the SimpleAudio device is not shown in the "Audio MIDI Setup" and the SimpleAudioDriverApp says the extension is not running.

I already tried various things from "csrutil disable" to "systemextensionsctl developer on" to "sudo nvram boot-args=-arm64e_preview_abi"

My console log shows error entries like this:

Error occurred while handling request "DextLaunch(arguments: Optional(["Check In Token": 18447, "Driver Extension Server Tag": 4294973749, "CFBundleIdentifier": de.bebetterorganized.dev.SimpleAudio.Driver, "DriverKit Reslide Shared Cache": 0, "Driver Extension Server Name": de.bebetterorganized.dev.SimpleAudio.Driver, "kOSBundleDextUniqueIdentifier": <3eb592b5 11e19191 027e272f 7fc6f5cc f24eaa62 367de83c 2fc697b5 4db10ed7>]))": Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error"

Now I'm not sure whether my extension is not loaded at all or whether it's just not detected as audio device and not connectable for any reason.

I'm trying all these things on a MacBook Air with Apple M2 CPU, MacOS 13.2.1 and XCode Version 14.2 (14C18), MacOS

Any hint would be appreciated, thanks a lot, Johannes

Thanks for the link. I've already been there and requested entitlements two times but never received an answer. Nevertheless I can see my requests in my account->identifiers and also XCode found the profiles and could apply them without error to my project. XCode also shows the appropriate entitlements. In addition I think those entitlements should not be needed if you run your Mac with SIP disabled.

How can I find out whether I'm running into an entitlement problem? Does Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error" point to an entitlement problem? What else could I do to find out why the extension is not loaded even though "systemextensionsctl list" shows the dext as enabled and active?

OK, I finally got the dext loaded and shown as audio device. There seems to be a change in the entitlements and com.apple.developer.driverkit.allow-third-party-userclients is now also the way to go on MacOS. After adding this entitlement to my XCode project I could load the dext, Now I'm trying to figure out the necessary changes for the client to connect to the driver. Currently the console shows me "UC failed userclient-access check, needed bundle ID ..." so I'll find out where to add my bundle ID in my client.

Can you report it through Feedback Assistant?

OK, I composed a new feedback (FB12198391) at Feedback Assistant ...

Unfortunately I'm still stuck here. So no positive Entitlement reply from Apple so far, no Feedback Assistant answer and also digging around with various options to bypass the Entitlement check also don't work. I've disabled SIP and tried nvram boot-args "amfi_get_out_of_my_way=0x1" and "-arm64e_preview_abi". The first seems to be required to start my app when it has the com.apple.developer.driverkit.userclient-access but you do not yet have this entitlement, the second is required to load the dext. But they don't seem to work together. I tried different ways to activate both but none worked so far. Does anyone know how to establish a connection for development purposes between a dext and an app on a MacBook with Apple silicon (M2) when you don't have been granted the Entitlement com.apple.developer.driverkit.userclient-access?

Thanks a lot, Johannes

And finally I got it to work thanks to this thread:

https://developer.apple.com/forums/thread/712051

So the secret here was to use -arm64e_preview_abi in order to load the dext and inside my XCode add AD_HOC_CODE_SIGNING_ALLOWED in the dext project and then switch both the app and the dexts "Code Sign Identity" to "Sign to Run Locally"

SimpleAudioDriver sample, cannot install dext
 
 
Q