0

I have a situation, where my IOS app crashes due to low memory. I notice that during such crashes, my UserDefault values are also erased. Anyone had any similar experience? Or are they (memory crash and user defaults erase) un-related in my case? (Do I need to look out for other reasons for erasing the User defaults?)

Thanks for your help

Edit: The issue was somewhere else. Memory crash does not erase user defaults, once you synchronize.

4

1 回答 1

3

I'm pretty sure you haven't written them to disk regularily:

[[NSUserDefaults standardUserDefaults] synchronize];
于 2012-05-04T04:13:33.373 回答