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, I am trying to send a data-only message to an iOS simulator react native app but the callback function in messaging().setBackgroundMessageHandler(onMessageReceived); is not being triggered where I am trying to show a Notifee notification.
constonMessageReceived=async(_message)=>{// console.log("first", _message);// Display a notificationawaitnotifee.displayNotification({title: "From Backend - DATA ONLY",body: _message.data,});};
On backend (Node.js)
constmessage: Message={token: RECEIVER_TOKEN,// For FCM Notification Display// notification: {// title: "Hello",// body: "World",// },// If client app wishes to display local notification with additional contentdata: {value: "TESTER BACKEND"},// Android Specific Settingsandroid: {priority: "high",},apns: {payload: {aps: {contentAvailable: true}},headers: {"apns-push-type": "background","apns-priority": "5","apns-topic": "",// your app bundle identifier},},};
Please assist. Thanks
The text was updated successfully, but these errors were encountered:
data-only messages will never be reliable on iOS, if you ever receive them it is a bonus. If you want to have FCM delivered on iOS you need to send a notification block in the FCM
I am also struggling to get message in IOS emulator. I want to know that on M3 Apple MacBook + Emulator, Is it possible?
OR I am trying for nothing, Is it ?
If you have an up to date macOS and Xcode and iOS version on Apple Silicon, and you have granted your app notification permissions, and then restarted your app, and you then register for remote notifications, it should be possible.
BUT NOT DATA-ONLY MESSAGES ON iOS, those may work they may not but they are unreliable and not useful for testing (since they are unreliable is it a real negative test result for no delivery where your code and config is wrong or a false negative test result for no delivery where system just didn't deliver?). use notification blocks
I do not believe anything here will result in changes to the code in this library, and that's what we use open issues to track so I'm going to close this as a user-specific item - you may find stackoverflow good for firebase support as well, the firebase team hangs out there and helps respond to questions
Hello, I am trying to send a data-only message to an iOS simulator react native app but the callback function in
messaging().setBackgroundMessageHandler(onMessageReceived);
is not being triggered where I am trying to show a Notifee notification.On backend (Node.js)
Please assist. Thanks
The text was updated successfully, but these errors were encountered: