Dam, this took far to long to suss out !!! I even left the London Open Hack 2009 early because I was unable to install development apps I was working on onto my iPhone, and it was proving so frustrating I decided to go home to try and fix it there … Dam!!!
So the error I was getting was:
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
I won’t bore you with all the variations, forums, websites read and ways I tried to solve this, and will leave you with the solution in this case. The problem was that the KeyChain App had changed it’s default keychain over to ‘system‘ and it should have been ‘login‘ as this is where all my keys and certificates are installed. Also, the default keychain is where Xcode looks. The default keyChain in the one in the keychains list that is bold. To make one the default, you right click on it and select the ‘make default’ item from the list.
Yep, That’s It!! and to be honest the error message make a little more sense now I’ve fixed it … Dam!