Leo
Leo

Reputation: 1567

iPhone applicationDidEnterBackground: method to save user data and any state information

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

Answers (1)

GorillaPatch
GorillaPatch

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

Related Questions