Is there a way to detect at run-time whether the device supports USBDriverKit?
Determine if DriverKit is supported on OS
Is there a way to detect at run-time whether the device supports USBDriverKit?
I'm not sure what you mean by this question. A few different answers:
-Architecturally, DEXTs load by matching against specific devices, so there isn't really anything to "detect"- your DEXT won't run any code until it loads and it won't load until it has something to match against.
-While it's technically possible we might someday ship a machine/system/configuration that didn't support USB, it hasn't happened yet. USBDriverKit was part of the initial release for macOS and iPadOS, so it's supported "everywhere" that DriverKit is.
What are you actually trying to figure out here?
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware
I have an app that runs on both iOS and iPadOS. on iOS versions, we have an MFi accessory that connects to the lightning port, and this accessory connects to a usb device. on iPadOS, with DriverKit enabled, we connect to the usb device directly.
So, from our code, we would like to be able to determine if DriverKit is supported at run-time, so we can direct the user with how to connect our peripherals.
So, from our code, we would like to be able to determine if DriverKit is supported at run-time, so we can direct the user with how to connect our peripherals.
First off, please file a bug about this the post the bug number back here, as this is something DriverKit should be solving "directly".
Next, the best option I've been able to come up with is to use UIDevice.userInterfaceIdiom. The main issue here is that you may get the iPad value when running in compatibility mode on a Mac or Vision Pro.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware