Ben Marten Ben Marten - 6 months ago 134
Objective-C Question

Xcode Compile Flag to Supress Nullability Warnings not Working?

For a limited time I want to suppress these kind of warnings the compiler is showing me in Xcode 7.3.1:

<File>: Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)


I have added this compiler flag to all classes under My Target/Build Phases/Compile Sources:
-Wnullability-completeness


But it's not working - the warnings are still shown. How can I get rid of the warnings?

Answer

To disable those warnings, you want: -Wno-nullability-completeness. Note the no-; the flag you're using enables those warnings.