Video explaining steps to fix Xcode codesign failed with exit code 1; expired certificates causing ambiguous matches

Xcode codesign failed with exit code 1; expired certificates

I’ve been getting a lot of comments about how to fix the Xcode codesign failed with exit code 1; expired certificates causing ambiguous matches. This problem is such a time sink that I suspect it really helps to have someone explain the simple solution for resolving it.

To make it easier for those who’d rather hear how to solve it, I made a short video explaining the solution.

I appreciate the feedback and I’m glad to help.

And thanks to everyone who’s helped me.

Xcode codesign failed with exit code 1; expired certificates causing ambiguous matches

If you work with Xcode code signing long enough you’ll run into an error like this:

/usr/bin/codesign failed with exit code 1

If you view the build results (Build->Build Results), and expand the error message (there is a little paragraph button on the right-hand side of the line) you may see something like this:

iPhone Developer: Firstname Lastname (hashcode): ambiguous (matches "iPhone Developer: Firstname Lastname (hashcode)" in /Library/Keychains/System.keychain and "iPhone Developer: Firstname Lastname (hashcode)" in /Users/username/Library/Keychains/login.keychain)
Command /usr/bin/codesign failed with exit code 1

You have two certificates, with the same unique identifiers. One is in your login keychain and the other is in your system keychain. The real problem is, you probably have an expired certificate conflicting with your active certificate.
Continue reading “Xcode codesign failed with exit code 1; expired certificates causing ambiguous matches”