Ios xcodebuild不';不显示所有编译错误?
我的项目中有2个编译错误(显示在XCode中) 但当我在终端中使用xcodebuild编译项目时,只显示一个编译错误Ios xcodebuild不';不显示所有编译错误?,ios,compilation,xcodebuild,Ios,Compilation,Xcodebuild,我的项目中有2个编译错误(显示在XCode中) 但当我在终端中使用xcodebuild编译项目时,只显示一个编译错误 xxx$xcodebuild -sdk iphoneos -configuration Debug .... .... [self updateAccountInfo];1 ^ 1 warning and 1 error generated. 是否可以使xcodebuild显示所有编译错误 在Xcode的首选项中,在“常规”选项
xxx$xcodebuild -sdk iphoneos -configuration Debug
....
....
[self updateAccountInfo];1
^
1 warning and 1 error generated.
是否可以使xcodebuild显示所有编译错误
在Xcode的首选项中,在“常规”选项卡中,选中“出错后继续构建”选项
我需要的是使用xcodebuild做同样的事情
编辑:
经过这些天的思考和研究,我认为xcodebuild无法做到这一点。它与xcode不同。当我们使用xcode来编译iOS项目时,xcode会按叮当声编译every.m。因此xcode具有“出错后继续构建”功能您需要设置xcode首选项来完成此操作(从
Terminal.app
):
对于xCode 8:
$ defaults write com.apple.dt.Xcode IDEBuildingContinueBuildingAfterErrors 1
如果要使用最新版本的xcodebuild/xctool在出错后继续生成,则需要使用
-IDEBuildingContinueBuildingAfterErrors=YES
运行它们
例如:
xctool -project SampleProject.xcodeproj/ -scheme SampleProject -sdk iphonesimulator build -IDEBuildingContinueBuildingAfterErrors=YES
看起来不再支持PBXBuildsContinueAfterErrors
您还可以使用
defaults write com.apple.dt.Xcode
将此设置永久化。如果您想了解当前版本的IDE是如何控制该设置的,您可以调用defaults read com.apple.dt.Xcode
并搜索“errors”和“continue”。尝试使用clang
标志-ferror limit=0
(只是猜测一下)。@特洛伊木马我只是尝试一下“-xcodebuild-sdk iphoneos-configuration Debug OTHER_CFLAGS=“-ferror limit=0”,它不工作。好的,运行defaults write com.apple.Xcode pbxbuilds continueaftererrors是的
?@特洛伊木马“pbxbuilds continueaftererrors”对我有效。非常感谢,这是我真正想要的。谢谢!我使用了”xcodebuild-sdk iphoneos-configuration Debug pbxbuilds continueaftererrors=YES“谢谢你。但我需要的是在一次编译中显示所有编译错误。经过深思熟虑,我认为这是一项不可能完成的任务。假设ClassA依赖于ClassB,现在ClassA和ClassB都有编译错误,编译器只能在ClassB中显示错误。对吗?
xctool -project SampleProject.xcodeproj/ -scheme SampleProject -sdk iphonesimulator build -IDEBuildingContinueBuildingAfterErrors=YES