set treat warnings as errors = YES
in the build settings
Prevent Xcode from building if there are warnings
-
05-03-2022 - |
سؤال
I want my Xcode project to have no warnings. How can I configure Xcode such that it won't build as long as there are warnings?
المحلول
نصائح أخرى
You can add the -Werr
switch to the compiler flags (on the Build phases tab, if I recall correctly). This will make the compiler treat all warnings as errors and it will choke on each warning.
لا تنتمي إلى StackOverflow