iOS:XCode 4.4.1:xcodebuild 错误 - 无法从文件读取诊断信息 [英] iOS: XCode 4.4.1: xcodebuild error - Unable to read diagnostics from file

查看:30
本文介绍了iOS:XCode 4.4.1:xcodebuild 错误 - 无法从文件读取诊断信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想在终端中使用 xcodebuild 从测试应用程序(称为 RunTeszt1)创建构建.该应用程序是一个 iOS 单视图应用程序,其中没有任何内容,只是创建并关闭.

So I would like to use xcodebuild in Terminal to create a build from a test application (called RunTeszt1). The app is an iOS single view application with nothing in it, just created and closed.

当我从终端执行此操作时,构建失败.

xcodebuild -target "RunTeszt1" -sdk "$iphoneos5" -configuration Debug

错误是:

无法从文件/var/folders/6s/cjw35hhs5lb6wpnx9m8lr2km0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/RunTeszt1-Prefix-eqntxoxxhhlzvieuipxpchn.文件):诊断文件中的错误标头

Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

当我从 XCode (4.4.1) 运行应用程序时,构建完成并且一切正常.但是,如果我运行控制台应用程序并在 XCode 中点击构建按钮后检查结果,我会在控制台中看到相同的错误消息.尽管如此,构建还是成功并打开了模拟器.

When I run the app from XCode (4.4.1), the build completes and everything is ok. However, If I run the Console app and inspect the results after hitting build button in XCode, I see the same error message in the console. Nevertheless the build succeeds and opens the simulator.

这真的是 xcodebuild 中应该发送给苹果的错误吗?如果是的话,我想很多人已经发送了.

Is this really a bug in xcodebuild which should be sent to apple? If it is I imagine a bunch of people already sent it.

我怎样才能让错误消失,或者阻止它取消构建过程,像 XCode 那样绕过它?

推荐答案

原来问题出在代码签名.即使我在构建设置中添加了Don't code sign,它仍然挂在上面.此外,-sdk xxx"似乎也有问题(无论我指定了什么 sdk).运行此命令导致构建成功:

Turns out the problem was code signing. Even though I put Don't code sign in the build settings, it still hanged up on it. Also it seems "-sdk xxx" was also at fault (no matter what sdk I specified). Running this command resulted in a successful build:

xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -target RunTeszt2

这篇关于iOS:XCode 4.4.1:xcodebuild 错误 - 无法从文件读取诊断信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆