Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Nullable conflicts when compiling for an actual device #15

Open
stsandro opened this issue May 25, 2018 · 2 comments · May be fixed by #33
Open

Nullable conflicts when compiling for an actual device #15

stsandro opened this issue May 25, 2018 · 2 comments · May be fixed by #33

Comments

@stsandro
Copy link

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... 🤔

@kelsheikh
Copy link

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.

@tache
Copy link

tache commented Sep 18, 2018

Still have this issue.

@arrrnas arrrnas linked a pull request Jan 22, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants