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:
I recently had the same issue. Keychain Access was the culprit.
Steps: Go -> Utilities -> Keychain Access Keychain Access: Edit -> Change Password for Keychain "login"
Change the password. Close and reopen Xcode, Clean & build again.
If option - Change Password for Keychain "login" - is greyed out:
Make sure under Keychains selected -> login and the padlock icon is open. To open the padlock you need the keychain password. If you do not know the password, go to Step 2.
With padlock unlocked and still option is greyed out. As last resort: Keychain Access -> Preferences Preferences: "Reset My Default Keychains" Reset the login. However be careful as stored keychains will be removed and you may have re-login on other connected devices as well.