8

In my App i am using NSUserDefaults to save some data. I have a doubt regarding this when i update the app in App Store, Will The Data in NSUserDefaults will remain same or it is removed.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
kiri
  • 1,977
  • 5
  • 27
  • 55

2 Answers2

15

NSUserDefaults will not be erased during update, but it will be removed when you uninstall an app.

Raptor
  • 53,206
  • 45
  • 230
  • 366
  • Is the data lost in nsuserdefaluts when we double click the home button and remove the object. – Imran May 20 '14 at 07:21
  • @Raptor - Wait what? that is NOT uninstall...NSuserDefaults won't be deleted when you force the app to quit - your second comment is wrong – orepor Mar 01 '15 at 12:47
6

No, it will not be erased on updating

nswamy
  • 1,041
  • 9
  • 16