Post not yet marked as solved
Result: App crashes on start and in Console we see: taskgated-helper - Unsatisfied entitlements: com.apple.developer.driverkit.userclient-access. We requested this entitlement.
Without being granted the specific entitlement as a dictionary of strings containing the bundle ID of your dext, this entitlement will do more harm than good. If you are planning on using com.apple.developer.driverkit.allow-any-userclient-access, please remove the com.apple.developer.driverkit.userclient-access entitlement from your app unless you have received the entitlement with the correct value.
taskgated-helper MyDriver: Unsatisfied entitlements: com.apple.developer.driverkit.allow-any-userclient-access
amfid /Library/SystemExtensions/B7624EEF-3688-4735-A58B-26FEF4DE353C/MyDriver.dext/MyDriver signature not valid: -67671
Does the provisioning profile for your dext contain this entitlement?
Result: Driver extension is started but we still see opening service: (iokit/common) general error
Likely due to the presence of both entitlements, or potentially because:
<code block>
Your driver contains no implementation of ::NewUserClient. This means that it can't accept the UserClient connection. Please make sure to read the documentation around the sample app, implement ::NewUserClient, and ensure that your dext's Info.plist has been appropriately set-up to accept UserClient connections.
Post not yet marked as solved
This is a requirement enforced by iPadOS, thus why you are seeing this error in Xcode. If you are attempting to create a non-iPadOS dext, and still seeing this error, please update your feedback request with that information.
Post not yet marked as solved
In order to read a file outside of your dext, you will need to do so from an application and communicate that information to the dext via a UserClient. Unfortunately, due to the sandboxing surrounding dexts, accessing files outside of their bundle is not possible at this time. Please file a feedback if you feel like the UserClient option is unacceptable.
Post not yet marked as solved
I appreciate your efforts to file feedbacks covering the issues you've found.
Automatic signing doesn’t support the PCI entitlement.
As mentioned previously, the Signing & Capabilities UI does not currently support the restricted entitlements for PCI and USB. If you enter the values manually into the entitlements file, the identifiers and provisioning profiles will be generated correctly. Is this not the case in your experience?
I haven't logged the equivalent FB for USB yet, but I'm not sure what the point of DriverKit for iPad is if you can't actually communicate with any devices.
USB transport supports a wildcard entitlement for development, (string value: *) which means that you can communicate with all USB devices from iPadOS during development.
You can request a PCI entitlement, which will allow you to communicate with PCI devices.
Post not yet marked as solved
For entitlements requiring custom values like PCI and USB transport, you must manually add them to the plist outside of Xcode's capabilities editor. The next time the profile is re-generated by Xcode, it should include your restricted entitlement.
Post not yet marked as solved
Entitlements requests are evaluated on a case-by-case basis. Please submit a request to be granted entitlements with your use case so the appropriate teams can review them.
Post not yet marked as solved
You would use multiple different APIs for this purpose. For both microphone and camera input, you could use AVCapture, and then use ScreenCaptureKit's synchronizationClock to make sure everything is synched. Alternatively, something like AVAssetWriter should handle synchronization automatically.
Post not yet marked as solved
Then the presenter says for an example of that we can check out "communicating between a driverkit extension and a client app", which is a macOS app that doesn't even use IOKit...
The "CppUserClient" target does use IOKit, as it is the part of the sample that communicates with the Dext.
and trying to import IOKit into an iPadOS target doesn't work anyway because the framework is not there.
Unfortunately, the IOKit headers for iPadOS are not available in Seed 1.
Post not yet marked as solved
At this time, IOKit on iPadOS only allows developers to communicate with Dexts.
Post not yet marked as solved
Unfortunately HIDDriverKit isn't available for iPadOS at the moment. Please submit feedback requests for the DriverKit families you'd like to see next on both macOS and iPadOS.
Pulling the conversation from the comments back out to an answer for clarity. Instead of using OSMappedFile::createFromPath, try getting the file from an OSBundle like so:
OSMappedFile* myMappedFile = nullptr;
OSBundle* myBundle = OSBundle::mainBundle();
myBundle->loadResources("configfile.conf", 0, IOVMPageSize * sizeToFit, &myMappedFile);
This should work without requiring any additional entitlements, and without having to know any GUIDs.
OSMappedFile can only be used to read files in the dext's bundle. Since you are getting kIOReturnError, that means that DriverKit couldn't find the file, likely due to you not having permissions to access it. You might try to open the plist of your dext first to make sure it's working for you, and then branch out from there.
Post not yet marked as solved
In order to match your driver to a device, you'll need to adjust the IOKitPersonalities settings in your driver's Info.plist in accordance with that article you've linked. If you're only changing the device_uid and manufacturer_uid in the code, it will not impact the matching process.
Post not yet marked as solved
Unfortunately, no one on the DevForums can help you with DriverKit entitlement requests. If you need help with an entitlement request, you'll need to follow-up with the entitlements folks. Additionally, make sure to check your developer portal to see if the entitlements were already granted.
It looks like there is an issue with Big Sur and Xcode 13.1 and later causing this problem. The problem shouldn't be present if you upgrade to Monterey.