Is the data stored using NSUserDefaults deleted wh

2019-02-17 05:06发布

问题:

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?

回答1:

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.