Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set iOS badge via background handler doesn't work #310

Closed
icecapp opened this issue Feb 4, 2022 · 2 comments
Closed

Set iOS badge via background handler doesn't work #310

icecapp opened this issue Feb 4, 2022 · 2 comments

Comments

@icecapp
Copy link
Contributor

icecapp commented Feb 4, 2022

The iOS > Badge > Integration docs lay out the following snippet

// Your app's background handler for incoming remote messages
firebase.messaging().setBackgroundMessageHandler(async (
  remoteMessage: FirebaseMessagingTypes.RemoteMessage
) => {
   await notifee.displayNotification(...)
   // Increment the count by 1
   await notifee.incrementBadgeCount();
})

This doesn't work for me, and I have read a few reports in not-so-related issues of this same problem.

Does this actually work for some of you ? If so, which versions are your running ?

@icecapp
Copy link
Contributor Author

icecapp commented Feb 9, 2022

setBackgroundMessageHandler was the culprit

notifee.incrementBadgeCount() works fine for me

setBackgroundMessageHandler issue was solved with
invertase/react-native-firebase#5656

@icecapp icecapp closed this as completed Feb 9, 2022
@klichg0ky
Copy link

@icecapp Hi! How did you solve this issue? notifee. incrementBadgeCount is not working for me in background/quit mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants