messaging.setBackgroundMessageHandler is not on iOS #7388
Unanswered
Ambreen-Kanwal20
asked this question in
Q&A
Replies: 1 comment
-
If someone else stumbles across this issue, follow these links: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use firebase/messaging in my react-native application to receive notifications from Firebase.
When a message is received, I'll process the data and update my badge count. On the Android device, everything works perfectly in the foreground, background, and terminated state. In iOS foreground and background are working fine. I quit the application, received a notification, setMessageBackgroundHandler is called and everything is working fine. As I open another application. My app notified me, but now setMessageBackgroundHandler is not being called.
When the app is terminated/quit, and any other application is running in the foreground. I receive a notification but the firebase setBackgroundMessageHandler event is not called. I've already added 'content-available': true in the notification payload but the event is not called when another application is in the foreground state. When I open my application, setBackgroundMessageEvent is called and another duplicate message is received in the app.
Is this issue relatable to the resource-allocation priority of iOS?
Kindly help/guide me to fix this issue. Every help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions