Skip to content

code sign error The identity doesn’t match any valid certificate

I am currently going through some tutorials for the SIO2 game engine I am currently evaluating.  I was able to run the code just fine on my iPhone simulator.  When I went to deploy this tutorial to my iPhone device, I got a “Code Sign error: The identity ‘iPhone Developer: Romain Marucchi-Foino (VC824XU999)’ doesn’t match any valid certificate/private key pair in the default keychain”.

To fix this so I could deploy, I clicked “Project > Edit Project Settings”. I changed the Code Signing Identity to point to my cert.  I got the same error. I searched the file system to try and figure out where that string was coming from.  In Visual Studio, sometimes I have to edit the project file with a text editor to fix weird issues like that.  So, I opened up the *.xcodeproj file to see if I could find it there.  I use TextMate for my Ruby code so I fired it up to open that and it turns out that *.xcodeproj is not a file but a package or directory or whatever Mac fanboys call it.  Inside I found the project file and found the string.  I wanted to figure out how to fix this through the UI so I didn’t just change the text there.  I did notice though that the old cert was listed under a different profile.

So, back in the project properties, I selected “All Settings” in the configuration drop down and changed the cert once again to my cert and everything worked!

UPDATE: Well, It happened to me again but this time, changing the code signing cert didn’t help.  I had to go into the actual project file by right/command clicking on myproject.xcodeproj and selecting “Show Package Contents”.  Edit project.pbxproj with a text editor.  Search for: “CODE_SIGN_IDENTITY[sdk=iphoneos*]” = “iPhone Developer: Romain Marucchi-Foino (VC824XU999)”;  Replace all of these with your own identity.  for me it was: CODE_SIGN_IDENTITY = “iPhone Developer: Jason Rowland (2RK77WERHG)”;  Save the file, and go back to xcode.  It will prompt you to reload from disk and say yes.  Maybe another day I’ll figure out where the setting is in the GUI but now that I know I can change these things with a text editor, I probably never will :(

{ 3 } Comments

  1. Matt | September 20, 2009 at 8:42 am | Permalink

    I was just wading through the same issue. The forum thread below had the solution in one of the last posts.

    http://sio2interactive.forumotion.net/sio2-engine-f3/codesign-error-t685.htm?highlight=code+sign+error

  2. KeKe | March 16, 2010 at 11:39 pm | Permalink

    Hi, Jason, thanks for the great tips, saves me a lot of times,
    by the way, I got a little be more problems than you had before

    Not only that I changed CODE_SIGN_IDENTITY manually, I’ve also changed the Profile Identifier number manually in order to get my template working

    I guess probably the Xcode UI have some sort of small problems to sync all information together..^^

    but great thanks for giving me the correct direction ^^

  3. Jeroen Keppens | April 24, 2010 at 3:47 am | Permalink

    Thanks for this!

    Drove me crazy…

    Jeroen

Post a Comment

Your email is never published nor shared. Required fields are marked *