When we ship an iOS app with a DriverKit driver bundled, we'd like to be able to check if the device the app is running on is actually capable of installing and running DriverKit drivers. However, I have yet to find a reliable way to achieve this. We want to know before the driver has even been enabled, as we want to direct the user to enable it in the app's settings.
First off, please file a bug on this and post the bug number back here. We really should have an API for this, and even if the solution below works, the behavior isn't documented as such, so I can't guarantee it will work (or continue to work if it does).
In any case, in iOS 18.4, we added the API "systemExtensions(forApplicationWithBundleID:)". While it isn't explicitly stated as such, what the API actually returns is the DEXT inside an app’s bundle set and their enablement state.
However, the other useful detail here is that on devices that don't support DriverKit, I THINK (but haven't had a chance to test) that it will actually end up returning "NULL"*, due to how its internal error handling works.
*Note that your app will also need to include the System Extension Entitlement for the API function.
As I said, I haven't had a chance to test this, but it's worth trying, since you'll probably end up using the API anyway.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware