Xcode Command /usr/bin/codesign failed with exit code 1 : errSecInternalComponent Xcode Command /usr/bin/codesign failed with exit code 1 : errSecInternalComponent ios ios

Xcode Command /usr/bin/codesign failed with exit code 1 : errSecInternalComponent


Open Keychain Access, then in the File menu select Lock All Keychains.

Then go back to Xcode and clean and rebuild. It will prompt you for your password again to unlock the keychain.

After this, assuming you have no other compile issues, it will succeed!


This occurs when the login keychain is locked. To unlock the login keychain, run:

security unlock-keychain login.keychain

If your keychain is password-protected, specify the password using the -p option:

security unlock-keychain -p PASSWORD login.keychain

If you're using a continuous integration system, you'll likely want to inject the password via an environment variable/token, which most CI systems offer in their settings.

The error code in question is described in Apple's docs as an internal error, so it's entirely possible this occurs in other cases too.


It seems like a bug in the code signing mechanism, restarting your mac should solve the problem