I have the following error:
Command /usr/bin/codesign failed with exit code 1
Here is what I already did for trying to fix this:
Here is my way to resolve:
Try finding out the details of this error in the "Build Results" view where the error is shown. On the right side of the line with the error message there is an icon with several lines. This will show you some helpful details.
This way I found out for me it was a duplicate iPhone developer certificate in my keychain - one of which had been expired. Maybe search for "iphone" in your keychain (select "All Items" category first).
I had special characters in the project name,renaming it to remove the characters, question marks, and insuring a developer certificate was enabled fixed the issue.
One solution more works with me, If you installed two versions of XCode and you install the second without uninstalling the first in the same directory (/Developer/), you did it wrong. So the solution that works for me was:
1 - Uninstall the current Xcode version with the command sudo /Developer/Library/uninstall-devtools --mode=all.
2 - Install the first Xcode version you had first.
3 - Again sudo /Developer/Library/uninstall-devtools --mode=all.
4 - Then, all is clean and you are able to install the version you want.
More things: maybe you need to restart the computer after install the Xcode or even (in some cases) install two times the Xcode.
I hope I works it take me a lot of time to know that, good luck!!!
Very often the error /usr/bin/codesign failed with exit code 1
occurred in case the user has no file extensions for texture files in Models.scnassets
folder. macOS
very often generates a files with hidden extensions.
For example: you have a file
myTexture
but it must include an extension as well –myTexture.png
.
Feel the need to share this, even though it's ridiculous.
I'd set up a second developer account on my Mac and couldn't codesign anything. The error was "the user cancelled the operation".
A simple reboot fixed this for me.