当我构建我的项目时,我会得到以下错误:
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin“CodeSign”
/Debug-iphoneos/MyApp.app“cd /Users/cracker/Desktop/MyApp/MyApp setenv PATH _CODESIGN_ALLOCATE_ setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/codesign -f -s "iPhone Developer: xxxxxxxx (D492H27WDR)”-resource-rules=/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app/ResourceRules.plist“-应享权利"/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:对象文件格式无效或不合适的命令/usr/bin/codesign失败,退出代码1
我的mac中同时安装了Xcode3.x和Xcode4.x (iOS5测试版)。几周前一切都很好。所有的证书都很好。所有证书状况良好。
我已将Xcode文件移至新目录。在那之后,我得到了这个错误。
发布于 2011-09-18 18:14:20
如果您将Xcode文件移动到一个新的目录中,并且在这样做后得到了这个错误,那么显然您应该将Xcode重新安装到适当的开发人员位置,这是默认的。我正在运行iOS 5 Beta,它在适当的目录下运行良好。首先,按照下面这样的教程完全卸载Xcode:http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html
然后重新安装Xcode在适当的地方,让我知道这是否可行。不过,IMHO应该能起作用。
https://stackoverflow.com/questions/7463280
复制相似问题