codesign failed with exit code 1

I’m having a build issue that I cannot solve.

Upon building in xcode out of unity I get the following error:

iPhone Developer: MyName (**mycode**): ambiguous (matches 
"iPhone Developer: MyName (**mycode**)" in /Library/Keychains/System.keychain 
and "iPhone Developer: MyName (**mycode**)" in /Users/foyleman/Library/Keychains/login.keychain)

Command /usr/bin/codesign failed with exit code 1

After looking at other posts that didn’t help me directly, I believe that xcode thinks I have a keychain installed in both my login and System. However, I do not have it installed twice from what I can see.

It’s been a few months since my last application and I’m onto building something new. What I did :

  • I created a new app id as com.companyname.appname (using my company and app name)
  • I created a new provisioning for my new app, assigned the new app id and devices.
  • renewed my current development certificate as it was out of date and made sure the provision was available to it
  • on my apple and my device, I deleted all my certificates and reinstalled them

Keychain access:

  • Login has two keychains. One for Apple and one for my iphone Developer
  • System only has 3 keychains being kerboeros, systemdefault and dashboard. I removed what appeared to be a duplicate for my iphone.

After the above I restarted my system and rebuilt the project. I received the same error.

  • Unity 3.3.0f4
  • Xcode version 3.2.5
  • Mac OSx 10.6.7
  • Building for Device 4.2 Release Unity-iPhone
  • selected signing profile matches the appname I am developing for. However I will note that I am assigned a total of 3 application identifiers (Team, companyname, appname). This shouldn’t matter.

:frowning:

resolved… Keychain Access will hide expired certificates.
View > Show Expired Certificates

There was my duplicate. I deleted the cert and it worked.