I am trying add a feature where On certain push, my timer will be started and even the app is close the timer will continue. Lets say my Points were 10 and now timer started. Once i close the app, maybe next time if i open the app the
1- If before 20 min it will show a count down timer running
2- if after 20 min at app again start it will add point to 10.
Now what Kind of timer or class can help me do this?
Regards
NSTimerwill not continue more than 600 seconds even if your app is in background, rest terminating the app.you can rather do this:
store this
prevTimestampinNSUserDefaults, and when coming back to the app,time difference will be
[nowTimestamp floatValue] - [prevTimestamp floatValue]