Gather all your signing entities in one Keychain if possible, it might resolve some weird signing issues you’re having.
When you have multiple signing entities in your Keychain, spread across different keychains Xcode can, and will, be confused from time to time.
I recently added yet another developer certificate to my Keychain, and ended up with Xcode trying to sign my pods with a key that didn’t belong to the app in question.
The solution was quite simple though, I simply had to move the newly added developer certificate+key to the login keychain, where the rest of my developer certificate and keys reside.
Apparently when signing the pods, Xcode stumbled upon my System Keychain at first, and resolved only one “valid” certificate and chose that.
By gathering all in the same keychain, Xcode now managed to resolve the correct certificate and key to use for the signing process.
I’m using CocoaPods as dependency manager, and it was the signing of the pods that triggered the issue to begin with.
I hope this helps, if you like me all of the sudden experienced signing issues for no apparent reason.