ios – React Native Run Task Once a Day


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:

  1. 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.

  2. 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?

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img