I would like to implement a simple countdown timer in the react-native app, and it should work even if the application is in the background. I've tried to use react-native-background-timer like:
BackgroundTimer.runBackgroundTimer(() => { if (seconds <= 0) { // stop the timer and do some logic. } setSeconds((s) => s - 1); }, 1000);
But the problem is that iOs stops its execution in about 90 seconds. What's the best solution in this case?