Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting the error "Command /usr/bin/codesign failed with exit code 1" in Xcode 6 on Yosemite?

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?

like image 225
scb998 Avatar asked Sep 24 '14 06:09

scb998


3 Answers

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.

like image 54
High Performance Coder Avatar answered Oct 12 '22 03:10

High Performance Coder


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 ;) )

like image 35
LMVogel Avatar answered Oct 17 '22 11:10

LMVogel


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

like image 2
C. Greene Avatar answered Oct 17 '22 10:10

C. Greene