Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: iPhone app codesign error

When building a new iPhone app in Xcode, I'm getting this error:

codesign error: code signing identity 'iphone developer' does not match any code-signing certificate in your keychain. once added to the keychain, touch a file or clean the project to continue.

What's the fix?

like image 617
Gabe Hollombe Avatar asked Dec 30 '08 17:12

Gabe Hollombe


5 Answers

The fix is pretty simple. In the Build Results window (which you probably got to by clicking the error icon in the lower right corner of your project window), change the pulldown menu from ‘Device - iPhone xxx’ to ‘Simulator - iPhone xxx’.

xcode-screenshot
(source: kickasslabs.com)

like image 158
Gabe Hollombe Avatar answered Oct 23 '22 08:10

Gabe Hollombe


You need to be part of the $99 developer program to test on the actual phone. Apple should have info about how to sign your code once you're accepted into the program.

like image 25
Shalmanese Avatar answered Oct 23 '22 07:10

Shalmanese


I got this error when I accidentally modified the code signing identity build setting at the target rather than the project level. Make sure that you have the correct information entered at the project level (get info on the project, rather than the target.) If you changed the target build settings, try deleting the values from there. The target will then inherit the project's setting.

I would also do a "clean all", then exit xcode, delete everything from the build folder and try to do another build. (This is an Xcode voodoo trick that seems to solve many code signing issues.)

like image 9
lajos Avatar answered Oct 23 '22 06:10

lajos


I just solved my code signing problem. What a nightmare! Over 8 hours of frustration over two days. I tried new apps, new app names, new certificates, deleting provisioning profiles etc. Basically I had two "iPhone Distribution" certificates in my keychain causing all code signing to fail. But one was hidden! The visible cert was in my Login keychain. The invisible cert was in my System keychain. Be warned, add your certificate to either keychain but not both! I deleted the certificate from the System keychain and it became a ghost certificate. It no longer appears in the System keychain "Keychain Access" tool but it did exist in the actual System keychain file, so effectively it had not been removed. I grepped the keychain file for the word Distribution and there it was! My solution was to remove that line containing iPhone Distribution from the keychain file which fixed the code signing. The result is I have a broken System keychain. But I can sign apps again \m/

like image 7
Gary Davies Avatar answered Oct 23 '22 08:10

Gary Davies


this may sound funny, but I searched everywhere for a solution. Eventually I found out that in Xcode in the top left, the dropdown where you select Device and verison, I had "debug" selected in the dropdown instead of release. Once I selected release the problem was fixed.

like image 3
Sam Dobbins Avatar answered Oct 23 '22 06:10

Sam Dobbins