We got an app for iPad which has two targets one for the App itself (MainApp target ) and another one for the Driver ( Driver Target ) using DriverKit.
The app works fine in Development, but I'm trying to distribute it with adhoc.
I've requested the Distribution Entitlement to Apple, after getting it, the App Id for the Driver has the following Capabilities:
DriverKit, DriverKit (development), DriverKit USB Transport (development), DriverKit USB Transport - VendorID, In-App Purchase
Now in the profile section, I've created a adhoc profile for the Driver AppId (Identifier). Obviously I've also created an Adhoc profile for the Main AppId
Finally in the Signing & Capabilities Section I set up the profiles for MainApp target, int the Debug one I set up the Development one and int the Release one I set up the adhoc one.
I do the same in the Driver Target, but when I set up the Adhoc one in the Release, I've got a warning:
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
Also interestingly the Signing Certificate section says: None
I also set up the Capabilities for the Driver Target:
- DriverKit USB Transport - VendorID
- DriverKit USB Transport ( Development )
Inside these capabilities I set up the vendor ID as dictionary
The problem is, if I try to Archive the app I will get the previous Warning message as error:
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.
Any idea what I'm missing?
Thanks
The problem is, if I try to archive the app, I will get the previous warning message as an error: Xcode 14 and later require a DriverKit development profile enabled for iOS and macOS. Visit the developer website to create or download a DriverKit profile.
Any idea what I'm missing?
So, as background, DriverKit has the most complicated code-signing configuration on our platform, which means its support in Xcode has lagged behind other technologies. This has been further complicated by a lack of documentation on the newer "development only" flow, along with misinformation/misunderstanding around what Xcode's errors actually "mean".
However... the good news is that I don't think you actually need to deal with this. More specifically, if you're:
-
Using Xcode 16+.
-
You've only been granted 1 entitlement value for a given family (this is true for you).
...then automatic code-signing should Just Work™. Here is what I would do next:
-
Change the configuration of all targets from "manual" to "automatic".
-
Hit build and then see what happens.
If the build fails, then what's typically happened is that Xcode's infrastructure picked up an existing broken profile and is choosing to use it instead of generating a new, correct one. If that happens to you, then do the following:
- In the Finder, navigate to:
~/Library/Developer/Xcode/UserData/Provisioning Profiles/
-
Inside that directory, you'll find a bunch of files named either
<uuid>.mobileprovisionor<uuid>.provisionprofile.These are the profiles Xcode uses when building. Delete all of them*. -
Hit build again.
...and, with luck, everything should build without issue. From that point, you should be able to archive the build and then export whatever you need to, with automatic handling everything. However, if something fails, then post the error message back here and we'll see what's going on.
*Strictly speaking, you can also just move them to a different directory. However, I prefer deleting them because:
-
Xcode can and will download and/or regenerate all of them, so you don't actually "need" them.
-
It's not unusual for there to be old/unnecessary/broken profiles in there, and there's no reason to keep those.
-
I've found it emotionally freeing to treat provisioning profiles as disposable objects of minimal value, not precious gems to be hoarded and treasured.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware