0

Possible Duplicate:
Do NSUserDefaults persist through an Update to an app in the Appstore?

This is just something I am scared about. I know when you delete the app, the data in NSUserDefaults are wiped out. Does this happen when the user updates? In this case should I backup the defaults data to another server/system.

Thanks guys, just trying to take precaution.

Community
  • 1
  • 1
MCKapur
  • 9,127
  • 9
  • 58
  • 101

2 Answers2

6

No.

You could test it with an app you have on your device already that needs updating.

Make sure you've done something in an app you can witness, update it, turn off internet to make sure it's not getting information from a server and check if the data disappeared.

This could be level progress through a game for example.

James Webster
  • 31,873
  • 11
  • 70
  • 114
3

No, values are kept from before.

You can lose user defaults if user doesn't backup data with iTunes and deletes app from the device.

John Topley
  • 113,588
  • 46
  • 195
  • 237
Rok Jarc
  • 18,765
  • 9
  • 69
  • 124