Closed HorjeaCosmin closed 4 years ago
Can you show us a sample code on how you handle message receiving on iOS?
Like I already wrote above:
this.messageListener = firebase.messaging().onMessage((message) => { console.log(message) }
Actually, on IOS simulator everything works fine for both Android / IOS, only on IOS real device it doesn't work.
Regards, C
hmmm I'm not aware of this API in our iOS SDK. Are you sure this is Firebase Messaging iOS SDK you are using?
I'm talking about the "onMessage((message)" part that I don't find it in iOS API. https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Messaging/Public/FIRMessaging.h
Hi @chliangGoogle,
please check this reference that we're using: https://rnfirebase.io/docs/v5.x.x/messaging/receiving-messages
Regards, C
The API you referred is react native adoptions on top of firebase so I'm afraid you need to check with their team to see if why their api couldn't handle it correctly.
@Feiyang1 Can you double check to see if this API belongs to our js SDK or it's react native's APIs.
https://rnfirebase.io builds on top of the native iOS SDK. Its APIs are similar to the JS SDK, but it eventually delegates to the native iOS SDK.
It doesn't look like there's a bug in the Admin SDK here. If you continue to have issues with receiving notifications on iOS, please raise an issue with Firebase Support.
Hi,
I'm trying to send data message using FirebaseAdmin.Messaging component. While on Android it works well, on IOS we cannot handle whatever we do. Our client application is react-native and the back-end environment is asp.net core 3.0.
Server side implementation:
... var notificationMessage = new MulticastMessage { Tokens = registrationTokens, Data = payloadData, Android = new AndroidConfig { TimeToLive = 10, Priority = Priority.High, }, Apns = new ApnsConfig { Aps = new Aps { ContentAvailable = true, } } };
var response = await FirebaseMessaging.DefaultInstance.SendMulticastAsync(notificationMessage);
...
React-native: ... this.messageListener = firebase.messaging().onMessage((message) => { console.log(message) } ...
One additional information, notification message work on both IOS and Android.
I'm looking forward for any help community can provide.
Regards, Cosmin