googleads-consent-sdk-ios icon indicating copy to clipboard operation
googleads-consent-sdk-ios copied to clipboard

Nullable conflicts when compiling for an actual device

Open stsandro opened this issue 7 years ago • 2 comments

When I compile and run on an actual device I get the following error:

Conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'nonnull'

In PACConsentForm.h:

/// Unavailable.
- (nullable instancetype)init NS_UNAVAILABLE;

Note: I have enabled Treat Warnings as Errors in my build settings. When I disable this setting everything works fine.

The easiest way to solve this suppress this would be the following (suppress the warning):

/// Unavailable.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability"
- (nullable instancetype)init NS_UNAVAILABLE;
#pragma clang diagnostic pop

But I'm not sure if this is such a good idea... 🤔

stsandro avatar May 25 '18 14:05 stsandro

Same problem here. I tried disabling Treat Warnings as Errors in my build settings but that didn't work. Also tried to inhibit warnings which also did not work. Obviously I shouldnt be even attempting either.

kelsheikh avatar Jun 03 '18 17:06 kelsheikh

Still have this issue.

tache avatar Sep 18 '18 19:09 tache