Why is "Code Sign On Copy" not an option for driver .dexts in XCode

I'm trying to copy a DriverKit project's dext output after building it, but it's not getting signed in the DerivedData until after the copy to my location. I've tried to select the "Code Sign On Copy" option in the Copy Files steps, but the checkbox is just not there (there's some kind of text box there instead that doesn't take any text?). It works for every other Copy Files selection; it only doesn't work for drivers.

I've also tried adding the CodeSignOnCopy attribute to the .dext product in the xcode project's Copy Files step manually without using the Xcode UI, but that doesn't do anything either.

Is there a way to set this attribute or otherwise mimic its functionality?

Code Sign On Copy isn’t necessary in most cases because the dext is signed when it’s built. So the build process runs something like:

  1. Build the dext target, which produces a signed dext.

  2. Build the app target, which embeds the signed dext within the app.

  3. Sign the app.

Is there a reason that’s not working for you?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

What I want to do is

  1. Build the dext target in project #1, which produces a signed dext in DerivedData
  2. The dext target copies that over to some Output directory
  3. I open a completely separate project #2 (Xamarin for my purposes, but could be an Xcode one)
  4. Build the app in project #2, and embed the signed dext in Output into project #2's app

Right now if I use a Copy Files step in project #1, it copies over the built .dext from DerivedData to Output, then signs the .dext in DerivedData, leaving the .dext in Output unsigned. Thanks!

Right now if I use a Copy Files step in project #1,

Right. A Copy File build phase is intended to be used to assemble your bundle, which means it naturally occurs before Xcode signs your bundle.

In your case I think you want to use a Build post-action script. I use this technique, in a very different context, for Network Extension development. The Sytem Extension Hints section of Debugging a Network Extension Provider gives a concrete example of how to set it up.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Why is "Code Sign On Copy" not an option for driver .dexts in XCode
 
 
Q