There are 2 compile errors in my project(Display in XCode).
But when I use xcodebuild to compile the project in terminal, only one compile error display
xxx$xcodebuild -sdk iphoneos -configuration Debug
....
....
[self updateAccountInfo];1
^
1 warning and 1 error generated.
Is it possible to make xcodebuild display all compile errors?
In the Xcode's Preference, in the General Tab, check the "Continue building after errors" option. asked here
What I need is to use xcodebuild do the same thing.
EDIT:
After thinking and researching these days, I think xcodebuild can't do this. It's different from xcode. When we use xcode to compile iOS project, xcode compile every .m by clang. So xcode has "Continue building after errors" feature
You need to set the Xcode preferences to do this (from Terminal.app
):
$ defaults write com.apple.Xcode PBXBuildsContinueAfterErrors YES
for xCode 8:
$ defaults write com.apple.dt.Xcode IDEBuildingContinueBuildingAfterErrors 1
If you want to continue building after errors using the latest version of xcodebuild/xctool you will need to run them with -IDEBuildingContinueBuildingAfterErrors=YES
.
Example:
xctool -project SampleProject.xcodeproj/ -scheme SampleProject -sdk iphonesimulator build -IDEBuildingContinueBuildingAfterErrors=YES
Looks like PBXBuildsContinueAfterErrors
isn't supported anymore.
Also you can use defaults write com.apple.dt.Xcode
to make this setting permanent. If you want to have a look how you current version of IDE is controlling that setting you can call defaults read com.apple.dt.Xcode
and search for "errors" and "continue".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With