I want the badge of my app to display the number of events a user has planned for today. With my current solution, the badge count only updates when the user opens the app, so it is very impractical. I am looking for the best way to update this number in the background.
My current options are:
-
Run a background fetch task, which periodically checks the number of events and updates the badge – from the documentation of react-native-background-fetch, it looks like this won’t work on iOS if the app is terminated.
-
Send periodic push notifications from a server to every user, setting the badge count for them – I would have to send this notification much more frequently than once a day because of different timezones.
Which approach would be better? Or is there a better way of accomplishing this?