How does one create a provisioning profile for embedded DEXT for iPhoneOS that is signed with a distribution cert?

I've been developing a solution that has an embedded USB driver. I can build and run my solution just fine but I cannot pass verification for uploading to App Store Correct and TestFlight

The problem is that the provisioning profile I am using (for development) does not have the explicit Vendor ID (idVendor) but is using the development value of asterisk "*". I've created a release version of my entitlements file with the proper Vendor ID and I have a distribution certificate for iOS. Further, I've created a provisioning profile for app-store distribution (not development) and imported it via Xcode. When I select this provisioning profile, I get the following errors from Xcode:

Xcode 14 and later requires a DriverKit development profile enabled for iOS and macOS. Visit the developer website to create or download a DriverKit profile.

Provisioning profile "MyProvisioningProfile - App Store" doesn't match the entitlements file's value for the com.apple.developer.driverkit.transport.usb entitlement.

If I create and use a DriverKit profile, The Xcode UI errors go away on the "Signing & Capabilities" page. However, these profiles seem to be for development only. I then get an error, during compilation, telling me that the app and extension have two different signers, one for development (DEXT) and one for distribution (App).

To sum up, using a DriverKit profile fails during the build process and using a distribution profile is a non-starter for Xcode. I can't even build.

What do I need to do to get this to work?

Answered by in
Accepted Answer

what exactly does your distribution profile look like? And what does your entitlement claim?

the message is saying that the contents don't match as expected. Follow the instructions here https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles to extract a readable copy of your profile and its signing certificate.

Have you requested the USB DriverKit entitlement for your vendor ID from Apple? Confusingly, the entitlement (granted by Apple to your development team) and the entitlement (claimed by an app) both have the same name but are two different things. You can claim an entitlement in an entitlements plist. In many cases, Xcode will automatically generate a corresponding entitlement in the provisioning profile for your app and everything will Just Work.

Managed entitlements, like com.apple.developer.driverkit.transport.usb, are special. For development, you can just claim the entitlement by putting any vendor ID into the plist entry. Xcode will match that to the "*" in the development provisioning profile. Such a profile is not valid for distribution. For distribution, the Team Owner needs to create a profile with the appropriate managed entitlements enabled. Mere Team Admin roles cannot do this, but the portal doesn't tell you that.

This problem has been solved. Please see this thread for details.

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

How does one create a provisioning profile for embedded DEXT for iPhoneOS that is signed with a distribution cert?
 
 
Q