1
votes

When I am building my project, I am getting this error:

CodeSign "build/Debug-iphoneos/MyApp.app" cd /Users/crackers/Desktop/MyApp/MyApp 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: xxxxxxx xxxxxxxx (D492H27WDR)" "--resource-rules=/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app/ResourceRules.plist" --entitlements "/Users/crackers/Desktop/MyApp/MyApp/build/MyApp.build/Debug-iphoneos/MyApp.build/MyApp.xcent" "/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app"

/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app: object file format invalid or unsuitable Command /usr/bin/codesign failed with exit code 1

I have both Xcode3.x and Xcode4.x (iOS5 beta) installed in my mac. Few week ago everything was working fine. All certificates was working fine. All certificates are in good state.

I had moved the Xcode(s) files to new directory. After that I am getting this error.

1

1 Answers

1
votes

If you moved the Xcode files to a new directory and you get this error after you did that, then obviously you should reinstall Xcode in the proper Developer location which is the default. Im running the iOS 5 Beta Xcode and it works fine in the proper directory. First completely uninstall Xcode following a tutorial from the web like this: http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html

Then reinstall Xcode in the proper place, let me know if this works. IMHO it should work though.