When the app is deleted what happens to the values stored in NSUserDefaults?

后端 未结 1 1766
醉梦人生
醉梦人生 2021-02-20 17:47

I have a little question regarding NSUserDefaults. When the application is deleted, what happens to the values stored in the NSUserDefaults? Do they ge

1条回答
  •  南旧
    南旧 (楼主)
    2021-02-20 18:30

    When an app is deleted from the device all local data associated with the app will be deleted too. This includes NSUserDefaults. However any data stored at an online service won't. For example, iCloud. The app will just fetch the data again if requested to do so by the user / developer.

    Edit

    As per mAu's comment below - this includes keychain data, which won't be deleted either.

    0 讨论(0)
提交回复
热议问题