views:

29647

answers:

12

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?

+28  A: 
Gabe Hollombe
Answering my own question because I think this will help others.
Gabe Hollombe
Thanks Gabe, I got the same error after upgrading to SDK 3.0 and spent waaaay too much time trying to fix it
Liam
I'm glad to know this thread is still helping folks. =-)
Gabe Hollombe
+3  A: 

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.)

lajos
I was getting this error too, and was mistakenly selecting the Target instead of the Project. Selecting the Project and updating the Signing Cert there fixed the problem.
Sophtware
I did the reverse: Kept changing the Project settings and Clean All with no results. Then I edited the Active Target, Set the proper Code Signing Identity of the Distribution Profile (duped from Release Profile). That did the trick. Thanks @lajos!
willc2
+8  A: 

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.

Shalmanese
A: 

thanks for your help. It was also top on google's list.

Consider using the comment feature for, well, comments as opposed to answers.
edoloughlin
A: 

Where is this menu!? Take a whole screenshot so I can find it, not just of the menu...

downvote. please make use of comment feature.
Shivan Raptor
A: 

No Vodoo necessary. Sometimes some app changes default keychain and Xcode stops finding iPhone Developer Keys. The solution is simple (it worked for me):

  1. List item Start Keychain Access app
  2. Ctrl+click on keychain where you stored your development keys and select Make Keychain Default
  3. Enjoy developing great iPhone apps.
A: 

I've signed up for the $99 developer thing. I went through the whole process about 1/2 a year ago.

now i finally made my first iphone app, and when i try to publish

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. I've read through this blog here, and yes when i switch it to simulator, it will build and go no problem. But i want to publish for the app store, so i think i need to find my key in the key chain, but i don't see anything saying "Developer key" or anything like that. What should the key be called in the key chain? if it's missing how do i get one again?

David Gutnik
A: 

Simple, often it's just that your certificate has expired.

look in your applications/utilities

open Keychain Access

Enjoy !

Joe Blow
A: 

Thanx a Lot!! Gabe

kakeroat
A: 

I had the same problem. Found the fix here:

http://www.iphonedevsdk.com/forum/iphone-sdk-tools-utilities/14909-help-certificate-s-t.html

In Keychain Access.app my Developer Certificate would show up as "This certificate was signed by an unknown authority". The reason was that I didn't have the ADC intermediate certificate (which you can download from "Provisioning Program" in "Certificates" tab. Once I installed this the developer certificate showed up correctly in keychain and my code could be deployed on the bloody phone.

Paul the n-th
A: 

Thanks to answers at Stackoverflow I got my apps codesigned and into the iTunes App store - along the way I realised 3 key concepts that Apple fail to communicate and have written an eBook called "iClue - App Code Signing Simplified". I was recently laid up for 2 weeks so I spent the time trying to generate code signing problems and this book is the result.

It can be found here: http://stuartmorrison.com/blog/iclue-app-code-signing-simplified/ it's only £7 but I have had some great feedback from people who've looked at it and used it and I iwsh I'd had it when I was first trying to get my apps code signed. I don't want to spam the forum but I think this is a very relevant post considering the subject matter.

Many thanks and happy code signing

Stu Morrison

Stuart Morrison
A: 

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/

Gary Davies