FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

OnTokenRefresh not fired on iOS (versions 3.3.9 and upper)

Open AnnaBagriy opened this issue 5 years ago • 3 comments

🐛 Bug Report

My iOS project is configured as it is provided in readme file. Everything works fine up to the plugin version 3.1.6. But beginning from stable 3.3.9 notifications are not working and OnTokenRefresh event is not triggered. But I need to upgrade this plugin because I have another dependency on Firebase, which is not compatible with version 3.1.6 of this plugin.

Also, I noticed that this line of code throws NullReferenceException var token = CrossFirebasePushNotification.Current.Token meanwhile CrossFirebasePushNotification.Current is not null by itself.

Expected behavior

OnTokenRefresh event is fired and notifications are received in plugin version 3.3.9.

Configuration

Xamarin.Forms 4.6.0.1180-4.8.0.1451

Version: beginning from 3.2.6 beta up to 3.3.13 beta

Platform:

  • [ ] iPhone X, iOS 14.0

AnnaBagriy avatar Sep 22 '20 09:09 AnnaBagriy

Same problem here, did you manage to find a workaround perhaps?

Ricbun16 avatar Oct 09 '20 06:10 Ricbun16

Same problem here, did you manage to find a workaround perhaps?

Unfortunately, didn't manage to find a workaround for specified versions. Had to downgrade it to v3.1.6 and also downgrade its dependencies. Wasn't easy make it all work together, but was the only way.

AnnaBagriy avatar Oct 09 '20 07:10 AnnaBagriy

I have the same problem but only in release mode. In debug mode i get the token.

stesvis avatar Jan 30 '21 09:01 stesvis