Post

Replies

Boosts

Views

Activity

Reply to Instruments: why? “Failed to gain authorization”
I suspect the answer here is that Instruments can't attach to unsigned code and executable targets build by the Swift Package Manager tooling doesn't sign code. This makes sense because it's meant to be open source and cross platform, yet code signing is a Apple thing. As a workaround, I created a simple Command Line Tool Xcode project and added my Swift Package as a dependency, with the tool's main.swift just calling into the package. Xcode will happily code sign everything and Instruments runs just fine. I suppose an open/related question is: can Instruments/macOS be persuaded to instrument unsigned code?
Jun ’21