iphone - 命令/usr/bin/codesign 失败,退出代码为 1

标签 iphone ios xcode build code-signing

当我构建我的项目时,我遇到了这个错误:

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

我的 mac 中同时安装了 Xcode3.x 和 Xcode4.x (iOS5 beta)。 几周前一切正常。所有证书都工作正常。 所有证书都处于良好状态。

我已将 Xcode(s) 文件移动到新目录。之后我收到此错误。

最佳答案

如果您将 Xcode 文件移动到一个新目录并且在您这样做之后出现此错误,那么显然您应该在默认的正确 Developer 位置重新安装 Xcode。我正在运行 iOS 5 Beta Xcode,它在正确的目录中运行良好。首先按照网上的教程完全卸载 Xcode:http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html

然后在正确的位置重新安装 Xcode,如果可行请告诉我。恕我直言,它应该可以工作。

关于iphone - 命令/usr/bin/codesign 失败,退出代码为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7463280/

相关文章:

ios - 无法让应用程序图标在 Xcode 6 中工作

ios - UIPageViewController 与 TableView

iphone - 读取 XML 并将其显示在 TableView 中

iphone - UIAlertView:单击警报框外部时关闭 UIAlertView

ios - PFQueryTableViewController 快速按日期划分

ios - 设置GreenhouseCI时出现"Provisioning profile does not match the developer certificate"错误

ios - Cocos2d : dealing with actions, 动画、 Action 序列和 CCTintBy

iphone - 动画 NSLayoutConstraints 更改(以及对更改的对象有约束的对象)

ios - 调用 Swift Xcode 7 中的 canEvaluatePolicy 额外参数 'error'

objective-c - Xcode 预处理器输出