iosfreak
iosfreak

Reputation: 5238

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

I am trying to test a app on my phone. I keep getting this error:

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

I have added the Provisioning profile and went through the set up on the apple iPhone portal.

I have been looking at this for a little over an hour and a half and I still can't figure it out.

Any ideas why this isn't working and why I am getting this error? Thanks!

Edit:

Here's some information on my build:

CodeSign build/Debug-iphoneos/TableView.app
cd "/flashPics_iPhone BACKUP 2:27"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Coulton Vento (LVEE98KDSF)" "--resource-rules=/flashPics_iPhone BACKUP 2:27/build/Debug-iphoneos/TableView.app/ResourceRules.plist" --entitlements "/flashPics_iPhone BACKUP 2:27/build/TableView.build/Debug-iphoneos/TableView.build/TableView.xcent" "/flashPics_iPhone BACKUP 2:27/build/Debug-iphoneos/TableView.app"

/flashPics_iPhone BACKUP 2:27/build/Debug-iphoneos/TableView.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1

Upvotes: 2

Views: 13002

Answers (2)

nlg
nlg

Reputation: 161

I fixed that error. The steps are:

  1. GOTO project
  2. select Edit Project setting
  3. in genatel tab project Format select your current Compatible Xcode version and select based SDK for your currunt iPhone Device; for example (iphone device 4.0) then...

build tab:

configuration : Distribution

Base SDK : choose your latest xcode SDK Device

Code signing identity : choose your provisional portal that you alredy created in iPhone Devloper center and you installed so select that particular provisioning.

Any iPhone OS Device : select same as Code signing identity (as mentioned above)

Then next step is go scrolling at below that find Product Name

Product Name : give Product name exactly same as your prodoct name. That's it.

Follow the same steps in configuration :Debug and Release

Upvotes: 0

Ajay
Ajay

Reputation: 2078

This is a good resource in figuring out how to setup the provisioning: http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices

You must download the provisioning profile, the certificate and make sure your iPhone's UDID is registered on those accounts. Then for the Distribution profile you need to specifically tell it in it's setting to use a Distribution Profile to make it build it.

Edit: Under Project Settings > Select the Configuration your using (Debug, Release, or Distribution) and make sure under Code Signing your Profile appears there.

Upvotes: 2

Related Questions