MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
269 stars 239 forks source link

'init' is deprecated: Use initWithPresentingWindow for macOS 10.15 and above #380

Closed punitganshani closed 11 months ago

punitganshani commented 1 year ago
/Users/pg/.pub-cache/hosted/pub.dartlang.org/flutter_appauth-4.2.1/macos/Classes/AppAuthMacOSAuthorization.m:76:45: warning: 'init' is deprecated: Use initWithPresentingWindow for macOS 10.15 and above. [-Wdeprecated-declarations]
    return [[OIDExternalUserAgentMac alloc] init];
                                            ^
In module 'AppAuth' imported from /Users/pg/.pub-cache/hosted/pub.dartlang.org/flutter_appauth-4.2.1/macos/Classes/AppAuthMacOSAuthorization.h:2:
- (instancetype)init __deprecated_msg("Use initWithPresentingWindow for macOS 10.15 and above.");
                     ^
In module 'Foundation' imported from /Users/pg/.pub-cache/hosted/pub.dartlang.org/flutter_appauth-4.2.1/macos/Classes/FlutterAppAuth.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
 
punitganshani commented 1 year ago

@MaikuB any plan to update this?

ManuelRauber commented 11 months ago

@MaikuB I'm also interested in an update :)

ManuelRauber commented 11 months ago

Oh, maybe interesting and not an issue at all @punitganshani.

In addition to the message you have posted, I have also this:

The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.12, but the range of supported deployment target versions

I changed this to a supported target version and then the other message went away as well. Maybe that's the real solution?

MaikuB commented 11 months ago

I asked the developer to change the PR title of https://github.com/MaikuB/flutter_appauth/pull/438 that would have addressed this. They still haven't done so. When I can, I'll look to do this myself, get this merged in and do a release

MaikuB commented 11 months ago

Closing as 6.0.2 has been published with the changes applied