Sunday, July 19, 2009

Dreaded Code Signing Failure!

I just spent the better part of the morning looking into a problem with my provisioning profiles. When I when into XCode this morning and tried to install a new app onto my IPod Touch I got the following error:

"a valid signing identity matching this profile could not be found in your keychain"

I brought up the organizer and all my profiles had the same error.

Perplexed I googled and tried everything short of starting over. I went here and found the site helpful, but it sadly did not have a fix. I did get a clue however.

Turns out that the fault was with File Vault. Or rather with keychain manipulation by File Vault. This Apple utility encrypts your home directory so that your files can only be accessed by you when you are logged in. Only the logged in user can see unencrypted files. To me this is much better than whole disk encryption that is used in the windows world. (More on that at a later date) After starting the process I decided to cancel the operation since it was going to take a long time to encrypt my files. Not wanting to give up my machine for hours, I punted. This is where the problem started. File Vault sets up a new keychain. This new keychain is set as your default. Since I did not complete the process, no keychain was actually created. The end result was that I had a default keychain that did not exist. XCode apparently only looks for keys on your default keychain. Since my default did not really exist, I had an epic failure. To cure it I simply used keychain access utility to set the login keychain as the default. Now everything is back to normal.

Seems to be 2 bugs. The first is that File Vault should never set the default keychain, until complete. Next is XCode should prompt you for which keychain to use, if the keys cannot be found on the "default" keychain.

Hope this helps save someone a bunch of time.


Tìoraidh!

1 comments:

  1. "Hope this helps save someone a bunch of time."

    Sure did! Thanks.

    ReplyDelete