CodeSign failed with a nonzero exit code

Recently Apple (and Unity) announced that Mac builds need to be generated and distributed via Xcode. And we have been doing it.
But since upgrading to latest Xcode 13 I am unable to even do a successful Build. I get the following error:

/usr/bin/codesign --force --sign CB4D5D8C0382C32A86DAAEF227F5E35A22DFC33F --deep -o runtime --entitlements /Users/svisves/Library/Developer/Xcode/DerivedData/ManokeStage3_4_5-ehltoajsvyocaagdkjljnwyxtvds/Build/Intermediates.noindex/ManokeStage3_4_5.build/Debug/Manoké\ Stage.build/Manoké\ Stage.app.xcent --timestamp=none --generate-entitlement-der /Users/svisves/Library/Developer/Xcode/DerivedData/ManokeStage3_4_5-ehltoajsvyocaagdkjljnwyxtvds/Build/Products/Debug/Manoké\ Stage.app

Command CodeSign failed with a nonzero exit code

The Xcode project was generated from Unity with Mac Store Validation = Y (for Store submission)

I have done all of the following after scouring forums:

  1. Setting Other Code Signing flags to --deep
  2. Removing Extended Attributes for the project
  3. Reimporting Certificates/Profiles
  4. Clearing project and restarting Xcode/Mac
  5. Automatic and Manual signing
  6. Adding Hardened Runtime with Disable Library Validation set to Yes

running into the same issue. Any success in getting this fixed??

Found a solution: install “Apple Worldwide Developer Relations …” G2 Certificates.
Now its compiling and signing fine!

Cheers

1 Like

I am just learning. How do you go about performing the change to the cert. I haven’t found anything googling. This thread is the only thing I found so far.

1 Like