0
votes

I am baffled about this error since I installed xcode 4.2 from xcode 3.2 and switched back to xcode 3.2 Since then I am not able to build for device for any of my projects for any configurations.

The error shown is:

CodeSign build/Debug-iphoneos/MyProject.app cd "/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test Development/MyProject" 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: Madhup (MW9495NA8W)" "--resource-rules=/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test Development/MyProject/build/Debug-iphoneos/MyProject.app/ResourceRules.plist" --entitlements "/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test Development/MyProject/build/MyProject.build/Debug-iphoneos/MyProject.build/MyProject.xcent" "/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test Development/MyProject/build/Debug-iphoneos/MyProject.app"

/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test Development/MyProject/build/Debug-iphoneos/MyProject.app: object file format invalid or unsuitable Command /usr/bin/codesign failed with exit code 1

The things I have tried to get over this are:

  • Completely removed all provisioning profiles and certificates and re-install them.
  • Change configurations (Debug to some other)
  • Completely uninstall and re-install xcode

Moreover if I try to build my project from some other systems with same provisioning profile, developer certificate and same build configuration I don't face any problem.

Please help me out as I am so frustrated and thinking of OS re-install :(

1
Maybe miss some framework link ? I got problem is the same Xcode project can run in Xcode 4.2 Lion version but can't build in Xcode 4.2 Snow leopard version...Webber Lai
no solution found.. finally switched back to Xcode 4.2 :(Madhup Singh Yadav

1 Answers

0
votes

So to clarify, you've removed xcode with...

sudo /Developer/Library/uninstall-devtools –mode=all

Have you also cleaned the build (Product menu -> Clean)? I know this sounds a bit of an obvious one - but lots of people forget to do it!