10

I'm using Xcode 6.1, OS X Yosemite preview 8, and I'm getting the following error on code signing my app:

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

Reading on Google, it seems to be linked to expired certificates/provisioning profiles. I deleted all of my certificates & profiles, created a new development certificate & profile, installed both, restarted my Mac, and I’m still getting the same error.

Can anyone shed some light on how to resolve this problem?

3
  • 2
    How about this: Try Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart XCode. Sounds like voodoo but it works for me and my team! Commented Sep 24, 2014 at 7:32
  • @LMVogel unfortunately that didn't work for me - but I'm glad it worked for someone... Commented Sep 25, 2014 at 1:28
  • So I've managed to fix the issue for my particular case - in the build settings, instead of automatically detecting the certificate & provisioning profile to use, i manually set them - and it works. Commented Sep 25, 2014 at 1:36

8 Answers 8

35

How about this: Try Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart XCode. Sounds like voodoo but it works for me and my team! (Posting it as answer, because it DOES work, at least sometimes and for some people. Possibly related to the weather ;) )

Sign up to request clarification or add additional context in comments.

8 Comments

OMG, it worked for me. Thank you for not being afraid to post Voodoo.
Wow after a huge battle with xcode (seems weekly) this worked. something to mention is my developer cert expired so i had to get a new one add it then delete the old THEN I got this error came here and this fixed it xcode 6.1 osx 10.10
IT WORKED. WHY IS THIS PROCESS SO RIDICULOUSLY COMPLICATED?
I tried this several times and it wasn't working for me, but then I cleaned my project and it magically started working. So if this doesn't work for you on the first try, try running clean and clean build folder.
@Kishorekumar - now there is a "Download All" which seems to do the trick
|
2

as of Xcode 6.3.2, here's what I did. from main project view, click on build settings and in the search bar type in certificate, a code signing tab should pop up, I chose "dont sign code". and it worked

Comments

1

So I've managed to fix the issue for my particular case - in the build settings, instead of automatically detecting the certificate & provisioning profile to use, I manually set them - and it works.

Comments

1

In my case I was getting this error while trying to build a project I downloaded from Github for my own personal use. I just went to the build settings and told it not to sign the code.

Comments

1

Another gotcha I noticed is that codesign will fail if run from an ordinary ssh login session. It has to be run on a MacOSX desktop GUI shell window. This catches me every time, so I've added a line to the build script to print a message about running the script on the MacOSX GUI if codesign fails.

Comments

0

Delete previous provisional profile and add new provisional profile.restart the machine if still its giving an error like above. when your machine shut off then automatically your device asking for permission then select Confirm and run your code....its working.

Comments

0

There appears to be a bug in XCode (I'm using 7.1.1) with returning to "Signing: None" after having attempted to sign with an expired identity, resulting in this codesign error even after you've apparently removed the bad signing identity.

The project.pbxproj file retains TargetAttributes for the expired identity, and Debug and Release settings both continue to show the following instead of the original empty values:

"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";

This persists after cmd+alt+shift+K and closing XCode. I fixed it with a git reset (if I hadn't committed before attempting to sign, I'm not sure how I would have found this).

Comments

0

I had to delete all my developer certificates from Keychain Access first, then use the Preferences -> Accounts -> View Details -> Download All approach to successfully re-sign my code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.