Reputation: 65
I am trying to develop a tracking app that tracks if you do a certain thing every day. Users will be able to press a button to say they did that thing that day. The challenge I am facing is how do I reset a variable that says they've completed that item every night at 12pm. What would be the best approach to this?
Upvotes: 0
Views: 176
Reputation: 7439
I don't think your approach (ie reset a variable) is right here as, if you intend to run on an iOS device, you can't be certain your app is going to keep alive forever: cf. Execution States for Apps in The App Life Cycle.
What you can do though is:
Hope it helps.
Upvotes: 1