All the above didn't work for me. I've an ObjectiveC Project with Cocoapods. I figured out, that the Run Script Phase with the avgtool is causing my problems.
xcrun agvtool next-version -all
is changing my ***/project.pbxproj file and XCode "thinks" to reset/reload all warnings.
I moved the the Run Script Phase before the compile step, but this didn't help; almost every build was canceled.
Any ideas?