AppAuth-iOS icon indicating copy to clipboard operation
AppAuth-iOS copied to clipboard

Nullability warning in OIDExternalUserAgentIOS

Open PGaissert opened this issue 5 years ago • 5 comments

In version 1.2.0 of AppAuth I get a nullability warning in Xcode 10.3 (10G8) at the follow line of code:

@interface OIDExternalUserAgentIOS : NSObject<OIDExternalUserAgent> - (nullable instancetype)init API_AVAILABLE(ios(11)) __deprecated_msg("This method will not work on iOS 13, use " "initWithPresentingViewController:presentingViewController");

the warning reads: Conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'nonnull'

For the time being I amended the issue be surrounding the line of code with: #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnullability" - (nullable instancetype)init API_AVAILABLE(ios(11)) __deprecated_msg("This method will not work on iOS 13, use " "initWithPresentingViewController:presentingViewController"); #pragma clang diagnostic pop

Would be great if you could fix this in the next version.

PGaissert avatar Sep 05 '19 14:09 PGaissert

Is there any reason not to merge this? Would love to see these warnings get cleaned up.

bpollman avatar Dec 12 '19 00:12 bpollman

Can you please merge this PR?

Parameswaran-Irulandi avatar Feb 29 '20 01:02 Parameswaran-Irulandi

Can we merge this in?

To save others the headache, your project (after performing Clean Build Folder) if you have SWIFT_TREAT_WARNINGS_AS_ERRORS = YES in your build settings will fail to compile.

bryanrahn avatar Aug 12 '20 15:08 bryanrahn

Is there a reason not to merge this? Maybe that's just been forgotten?

Wooder avatar Jun 23 '21 15:06 Wooder

Probably because this is more a problem of project configuration: I have an old project, where I get this issue (an error actually) after trying to update AppAuth. In a brand new project, however, I don't get any warning.

I am out of ideas why this is the case …

below avatar Jul 01 '21 20:07 below