I would like to store a user’s last use of the application and compare it with the current date.
According to the compare I would like to pop a notification on the screen.
How and where do I implement the code of saving the last date? (not in ApplicationWillTerminate as i read in another thread here)
How and where do I implement the code of reading that value?
(It should be a NSDate and use an if statement of course..)
User
NSUserDefaultswhich has been built just for these kinds of things (it’s a persistent key value storage with some limitations). Here is a quick snippet:Where you want to place this depends on what exactly you would like to measure.