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 :(