8

Currently I'm creating an app that is storing data using NSUserDefaults.

So when I upload v1 of the app to the app store and then make a new update for the app (v2) is the data stored in NSUsedDefaults deleted when the user updates to the new version?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
AFB
  • 550
  • 2
  • 8
  • 25
  • 1
    Why would the data be deleted? Think about the millions of annoyed people there would be if data was deleted simply for updating an app. – rmaddy Jan 26 '14 at 19:59

1 Answers1

16

The data stored with NSUserDefaults is not deleted when the user updates the app.

It will only be deleted if the user deletes the app.

murat
  • 4,893
  • 4
  • 31
  • 29
  • Is the data lost in nsuserdefaluts when we double click the home button and remove the object. – Imran May 20 '14 at 07:22
  • 1
    No, the data is not deleted when the user forces your app to close. However, the latest changes might be lost if they are not synced yet. – murat May 20 '14 at 07:49