🐛 [firebase_messaging] iOS Push Notifications not received when app is terminated using Firebase Data Messages
I configured my app to work with FCM Data messages, push notifications are coming when the app is in foreground and background state, BUT NOT if the app is terminated (swipe up from multitasking). API : { "data": { "type": "guide", "id": "07fc127bc9b646df8abe" }, "to": "/topics/guide", "priority": "high", "content_available": true } How can I solve the problem in this situation?
That looks like a data only message. These messages don't trigger notification alerts. Try adding a title and a body in the notification object.
@HieuHongLe94 If you are swiping away to terminate the app, according to the documentation, you'll need to manually reopen app to start receiving messages again:
See this link for further reference: https://firebase.flutter.dev/docs/messaging/usage#receiving-messages
Closing this for now.
@HieuHongLe94 If you are swiping away to terminate the app, according to the documentation, you'll need to manually reopen app to start receiving messages again:
See this link for further reference: https://firebase.flutter.dev/docs/messaging/usage#receiving-messages
Closing this for now.
Can we handle it when use data only message ?
That looks like a data only message. These messages don't trigger notification alerts. Try adding a title and a body in the notification object.
Yes. But i want to use data only message :)
In this case, you might have to use it in conjunction with a package such as flutter_local_notifications to trigger the notifications for you. You should however not rely on background processing to be reliable across platforms. This is one of the issues I'm currently dealing with.
But yeah, as mentioned by @darshankawa, if you terminated the app by swiping up you'll need to manually reopen the app to start receiving messages again.
In this case, you might have to use it in conjunction with a package such as flutter_local_notifications to trigger the notifications for you. You should however not rely on background processing to be reliable across platforms. This is one of the issues I'm currently dealing with.
But yeah, as mentioned by @darshankawa, if you terminated the app by swiping up you'll need to manually reopen the app to start receiving messages again.
Thank you . I will use notification message