alexziskind1 / nativescript-oauth2

Other
85 stars 93 forks source link

Warning: topmost() is deprecated. Use Frame.topmost() instead. #114

Open sarboleda22 opened 4 years ago

sarboleda22 commented 4 years ago

Version numbers:

Steps to reproduce it.

Follow any tutorial with ^6.5.0 versions of {N}. Run:

client = new TnsOAuthClient(providerType, true)
client.loginWithCompletion((tokenResult: ITnsOAuthTokenResult, error) => {
    if (error) {
        console.log(error)
    } else {
        console.log(tokenResult)
    }
})

You get in console: topmost() is deprecated. Use Frame.topmost() instead.

Solution

In both loginWithCompletion and logoutWithCompletion in oauth.ts, change:

frameModule.topmost()

For:

frameModule.Frame.topmost()
emog commented 4 years ago

It's the same here. I get an "topmost() is deprecated. Use Frame.topmost() instead."

Przemase commented 4 years ago

This fix works ok