I just updated to the newest version of Xcode and encountered an error while running our automated build scripts (they use the xcodebuild
and xcrun
commands).
The error occurs immediately after the ### Codesigning '/Users/...
log statement and looks like this:
Program /usr/bin/codesign returned 1 : [/var/folders/__/63j90nkn2lg18ct1nq791_nc0000gn/T/g5hbigh1tM/Payload/CurrentTarget.app: replacing existing signature
/var/folders/__/63j90nkn2lg18ct1nq791_nc0000gn/T/g5hbigh1tM/Payload/CurrentTarget.app: cannot find code object on disk
I found docs here listing and briefly describing the error but no specifics about how to resolve it.
Because I spent far too long looking for the resolution to this (nothing on S.O.) I'm going to post the answer below in case others encounter the same problem.