Chirila Vasile
Chirila Vasile

Reputation: 359

NSUserDefaults is persistent?

I have a big problem with NSUserDefaults : I receive a feedback from an user who just updated the application from AppStore and he complained that some of the values from NSUserDefaults are gone.

There is a little possibility that the NSUserDefaults lose some data after application update? I read about this problem and some guys have this problem too, but I don't receive a clear answer.

Thanks

Upvotes: 1

Views: 171

Answers (1)

Woodstock
Woodstock

Reputation: 22926

NSUserDefaults are not usually reset unless the user deletes the app.

For basic data, NSUserDefaults is the best way to save data such as preferences, dates, strings etc. If you need to save images and files, the file system is better. (NSCoding)

If you have large datasets you should use CoreData or SQL on an separate server.

Upvotes: 1

Related Questions