Xamrin forms iOS app no longer receiving FCM registration token after updating Xamarin.Firebase.iOS.CloudMessaging to 8.10.0.3 from 3.12

40 views Asked by At

After receiving Firebase's reminder "Update your apps to the latest Firebase Cloud Messaging APIs and SDKs", we have changed the server side to support HTTP V2 and ceased using server key. This part is OK. In client mobile app, we updated Xamarin.Firebase.iOS.CloudMessaging to 8.10.0.3 from 3.12. The code change is minimal, see below.

AppDelegate.cs:

  1. commented out //Messaging.SharedInstance.Delegate = this;

         //Messaging.SharedInstance.ShouldEstablishDirectChannel = true;
    

from [Export("messaging:didReceiveMessage:")] public void DidReceiveMessage(Messaging messaging, RemoteMessage remoteMessage) { // Handle Data messages for iOS 10 and above. var data = remoteMessage.AppData;

to [Export("messaging:didReceiveMessage:")] public void DidReceiveMessage(Messaging messaging, NSDictionary data) { // Handle Data messages for iOS 10 and above.

  1. no change to [Export("messaging:didReceiveRegistrationToken:")] public void DidRefreshRegistrationToken(Messaging messaging, string fcmToken)

GoogleService-Info.plist, no change Info.plist, no change

I tried reinstalling both debug and ad-hoc builds but couldn't receive registration token when starting the app. In earlier builds, it worked straightaway.

What have I missed? How to troubleshoot this problem?

0

There are 0 answers