You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! On 10 version of plugin for iOS - FirebasePlugin.getToken(token => console.log(token),error =>console.error(error)) always returns undefined, because logic of method was broken:
now getToken in Objective-C source not use callback from javascript FirebasePlugin.getToken call, it use sendToken method
and this is totally wrong and breaks specification.
So if you didn't call onTokenRefresh and call FirebasePlugin.getToken(token => console.log(token),error =>console.error(error)) plugin not send token at all.
The text was updated successfully, but these errors were encountered:
Hello! On 10 version of plugin for iOS -
FirebasePlugin.getToken(token => console.log(token),error =>console.error(error))
always returns undefined, because logic of method was broken:now getToken in Objective-C source not use callback from javascript FirebasePlugin.getToken call, it use sendToken method
cordova-plugin-firebasex/src/ios/FirebasePlugin.m
Lines 151 to 156 in 82d1ddb
which always checks tokenRefreshCallbackId (which sets only by onTokenRefresh method)
cordova-plugin-firebasex/src/ios/FirebasePlugin.m
Lines 369 to 371 in 82d1ddb
and send token only to this callback
cordova-plugin-firebasex/src/ios/FirebasePlugin.m
Lines 430 to 434 in 82d1ddb
and this is totally wrong and breaks specification.
So if you didn't call onTokenRefresh and call FirebasePlugin.getToken(token => console.log(token),error =>console.error(error)) plugin not send token at all.
The text was updated successfully, but these errors were encountered: