Reputation: 1567
What is the best approach to save any application state information or user data information before application goes to background?
Say for example I have one application level variable called "Authorised". Where should I save this information so I can get it back if it is purged by memory management.
Regards,
Atif
Upvotes: 2
Views: 2858
Reputation: 5057
Well that depends a bit how big and complex the data is you want to save. If it is just a small amount of data representing the state, I would have a look at NSUserDefaults.
Have a look at this question as well:How to show the same view when the app is reopened
Upvotes: 2