I need to support both use case (exec and dylib).
OK.
[Library validation] does not apply in my scenario since the library is provided by a third party
I’d like to better understand that. It’s quite common for Mac apps to use libraries created by other developers, and they retain library validation by re-signing those libraries. Is there something preventing you from doing that in this case?
The most obvious case where folks need to disable library validation is that their app supports in-process plug-ins, where those plug-ins are built and shipped by other third-party developers in a way that’s completely independent of the main app’s vendor. Is that what’s happening here?
Because if you’re managing these plug-in releases then it’d be better to have you re-sign the plug-in and leave library validation enabled.
And that brings me back to your Team ID requirement. Do you accept code from a small set of teams that you know in advance? Or do you learn about the Team ID via some other channel?
The reason I ask is that we have a relative new option here, the ability to restrict libraries to a specific set of teams. See Applying launch environment and library constraints.
Still, all of the above is only relevant for libraries, and you also have executables to deal with.
Which brings me back to the point where you departed from the well-trodden path, namely, the time taken to verify a code signature.
Verifying a code signature can take a while. The canonical example of this is Xcode:
% /usr/bin/time codesign -v --deep --strict "/Applications/Xcode.app"
12.73 real 11.09 user 88.21 sys
However, verifying a less massive app is typically pretty quick:
% /usr/bin/time codesign -v --deep --strict "/Applications/Apple Configurator.app"
0.27 real 0.19 user 1.43 sys
In your case it’s taking minutes, which suggests that either the thing you’re verifying is huge or something is going wrong. How big is the code you’re verifying?
And if you verify the same code using codesign from Terminal, as I’ve shown above, does it have the same problem?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"