Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Error: Command /usr/bin/codesign failed with exit code 1

I have no idea why I am getting this error. I believe that I have all the correct provisioning profiles and such. I did just move to a new computer but I did also bring over the private keychain developer key. I have my developer files synced with Dropbox so I didn't need to move over the Xcode project. Here is the error:

   CodeSign "/Users/michaellindahl/Library/Developer/Xcode/DerivedData/Fraction_Calculator-cgirhuuvywfnsyenisucsuauquoz/Build/Products/Debug-iphoneos/Fraction Calculator Pro.app"
    cd "/Users/michaellindahl/Dropbox/Xcode/lindahl studios/FractionCalculator"
    setenv CODESIGN_ALLOCATE /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/codesign --force --sign "iPhone Developer: Michael Lindahl (MXXX0X0XXB)" "--resource-rules=/Users/michaellindahl/Library/Developer/Xcode/DerivedData/Fraction_Calculator-cgirhuuvywfnsyenisucsuauquoz/Build/Products/Debug-iphoneos/Fraction Calculator Pro.app/ResourceRules.plist" --entitlements "/Users/michaellindahl/Library/Developer/Xcode/DerivedData/Fraction_Calculator-cgirhuuvywfnsyenisucsuauquoz/Build/Intermediates/Fraction Calculator.build/Debug-iphoneos/Fraction Calculator Pro.build/Fraction Calculator Pro.xcent" "/Users/michaellindahl/Library/Developer/Xcode/DerivedData/Fraction_Calculator-cgirhuuvywfnsyenisucsuauquoz/Build/Products/Debug-iphoneos/Fraction Calculator Pro.app" 

CSSM_SignData returned: 8001094A
    /Users/username/Library/Developer/Xcode/DerivedData/Fraction_Calculator-cgirhuuvywfnsyenisucsuauquoz/Build/Products/Debug-iphoneos/Fraction Calculator Pro.app: unknown error -2070=fffffffffffff7ea
    Command /usr/bin/codesign failed with exit code 1

Thanks for your insight.

like image 491
michaellindahl Avatar asked Aug 15 '11 22:08

michaellindahl


3 Answers

You've almost certainly got corrupted certs :

Revoke old certs, generate new ones, new provisioning profile, the works, magic happens again

like image 193
KevinDTimm Avatar answered Nov 02 '22 11:11

KevinDTimm


This seems senseless, but I simply locked and then unlocked the login keychain and the problem went away. On reflection, the problem occurred after I had added a new certificate to the keychain. Maybe the addition of this additional certificate (unrelated to the current project) caused the problem.

like image 21
plm Avatar answered Nov 02 '22 10:11

plm


Try going through all of the steps in the Managing Devices and Digital Identities document. This should help you verify that your machine is correctly set up.

like image 34
csano Avatar answered Nov 02 '22 11:11

csano