views:

7217

answers:

7

Hi Everyone:

I am attempting to deploy my first development iPhone app, and am running into some problems. I have successfully went though the online Provisioning Assistant, but now I am stuck. No matter what I do, I always get the following error.

/usr/bin/codesign failed with exit code 1

Anyone have any ideas why this is happening?

+4  A: 

Check the CODE_SIGN_IDENTITY property in your build settings. Is your provisioning profile selected there?
You also need to enter a valid bundle identifier in your apps .plist.
The identifier has to match the one you provided when generating the profile.
Apple has a technote about that here.

weichsel
Turns out that the valid bundle identifier was the problem. Thanks for your help, it's now fixed.
PF1
+6  A: 

I just came across this error, and here's what I found out in case this helps anyone: I discovered that you can right click the error message in Xcode and choose expand to get more details, including a description of the problem.

In my case, I had two copies of my developer certificate with the same name in different keychain files, and Xcode couldn't figure out which one to use.

Tobias Cohen
How did you resolve this? I'm having the same issue, but Keychain Access is only showing me one certificate.
Dan Ray
I found it. For the record, the issue was an expired certificate on my System keychain. Keychain Access doesn't, by default, show expired certs. I went to the System keychain, made KA tell me about expired certificates, deleted the expired one that was colliding with my proper one on the login keychain, and bob's yer uncle.
Dan Ray
Tobias, you're brilliant. Thanks for finding that right click trick.
Greg Combs
I also had this problem. In my case, expanding it showed that the common name was "ambiguous" because TweetDeck of all things seemed to have commandeered the keychain for on of my account logins. I had to go into Library/Application Support/Adobe/Air/ELS/ and blow away the files located in there. Then everything worked fine. Bizarre!
dredful
A: 

I had the same problem. In the end it turned out that my private key did not allow codesign to access it. One can see this in the info dialog in keychain application.

A: 

I have to agree with Tobias. The error is too generic. When the same thing happened to me I dug into the error message and realized I'd screwed up something in the build properties, but not the code signing. So yeah, I'd dig in to the details.

Rob Kelley
A: 

One possible cause is that you doesn't have permission to write on the build directory.

Solution: Delete all build directory on your project folder and rebuild your application.

SEQOY Development Team
A: 

I just came across this error and it was because I was trying to write the build file to a network drive that was not working. Tried again from my desktop and it worked just fine. (You may have to "Clean" the build after you move it. Just choose "Clean all Targets" from the "Build" drop-down menu).

Tobias is correct though, dig into the details on the code by right-clicking it to see what your specific problem is.

Dancreek