I'm trying to display some date when the current date changes. How can I check if the date has changed when the app is open. If the date isn't changed then there is no data presented. If the date has changed then display the data.
Asked
Active
Viewed 503 times
1 Answers
0
You could record an NSDate
(Date
) object on each launch and compare the time between them.
1) In App did launch, check for previously recorded Date.
2) In App did launch, instantiate a Date object with current time.
3) Check if previous object exists and compare with current time if so, else first launch.
4) Execute desired logic.
This is not perfect as it can be 'tricked' by user manually moving the date/time.
Also you should look at these docs.

Woodstock
- 22,184
- 15
- 80
- 118