Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
This happens if you forgot to change your build settings to Simulator
. Unless you want to build to a device, in which case you should see the other answers.
I 'tripped' across my solution after 2 days...XCODE 4.0
I've just upgraded to XCode 4.0 and this code signing issue has been a stunning frustrastion. And I've been doing this for over a year various versions...so if you are having problems, you are not alone.
I have recertified, reprovisioned, drag and dropped, manually edit the project file, deleted PROVISIIONING paths, stopped/started XCODE, stopped started keychain, checked spelling, checked bundle ID's, check my birth certificate, the phase of the moon, and taught my dog morse code...none of it worked!!!!
--bottom line---
- Goto Targets... Build Settings tab
- Go to the Code Signing identity block
- Check Debug AND Distribution have the same code signing information ..in my case "IPhone Distribution:, dont let DEBUG be blank or not filled in.
If the Debug mode was not the same, it failed the Distribution mode as well...go figure. Hope that helps someone...
Figure: This shows how to find the relevant settings in XCode 4.5.
Check if you are building for device instead of simulator. Go to Xcode menu 'Project' -> 'Set Active SDK' change from 'Device' to 'Simulator'
Under Xcode 4.1 Check your build settings for the project and your targets. For each check under 'Code Signing' check 'Code Signing Identity' and change over to 'Don't Code Sign'
I had the same problem. I'm very new to iphone development and it was my first time trying to load my program onto my iphone. The message is correct, you need to create a certificate in the keychain. The best walkthrough is here:
http://developer.apple.com/ios/manage/overview/index.action
You of course need to have a developer account (need to have paid the $100 yearly fee).
I hope this helps.