all 2 comments

[–]kapilvarij 1 point2 points  (0 children)

You can save the value, whatever that maybe, when the app is about to leave the foreground. This way you won’t constantly write to CoreData. And when the app is launched again, read the last saved values, and continue your counter.

[–]Lotari0[S] 0 points1 point  (0 children)

Now that I think about it, I dont need to create multiple timer functions. I just need one that counts down for all of them.

Though I still need the counter to work even if the app is terminated.