简体   繁体   English

应用更新时是否删除了使用 NSUserDefaults 存储的数据?

[英]Is the data stored using NSUserDefaults deleted when the app is updated?

Currently I'm creating an app that is storing data using NSUserDefaults.目前我正在创建一个使用 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?因此,当我将应用程序的 v1 上传到应用程序商店,然后对应用程序 (v2) 进行新更新时,当用户更新到新版本时,存储在 NSUsedDefaults 中的数据是否被删除?

The data stored with NSUserDefaults is not deleted when the user updates the app.当用户更新应用程序时,使用NSUserDefaults存储的数据不会被删除。

It will only be deleted if the user deletes the app.只有当用户删除应用程序时,它才会被删除。

likely easy to lose UserDefaults data after updating the app It's happened significantly starting from iOS 15更新应用程序后可能很容易丢失 UserDefaults 数据从 iOS 15 开始发生明显

I think you need to read the answers to this question我认为你需要阅读这个问题的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当应用程序被删除时,NSUserDefaults中存储的值会发生什么变化? - When the app is deleted what happens to the values stored in NSUserDefaults? 更新应用程序时如何强制删除NSUserDefaults? - How to force delete NSUserDefaults when app is updated? 在NSUserDefaults中存储字典并使用存储的数据。 - Storing a dictionary in NSUserDefaults and using the data stored. 应用终止时从NSUserDefaults清除数据 - Clear data from NSUserDefaults when app kill 当卸载放置在那里的应用程序时,是否删除了存储在NSUserDefaults中的值? - Are values stored in NSUserDefaults removed when the app that put them there is uninstalled? 我存储在NSUserDefaults.standardUserDefaults()中的数据何时更改? - When will the data i stored in NSUserDefaults.standardUserDefaults() change? NSUserDefaults在使用应用程序时保存并重新加载,但在重新启动应用程序时重置 - NSUserDefaults save and reload while using app but reset when app is restarted 如何在更新的应用程序上清除NSUserDefaults - How to clear out NSUserDefaults on an updated app 更新iOS应用程序时,库/缓存中的文件是否已删除? - When an iOS app is updated, are files in Library/Caches deleted? 应用程序更新时,缓存目录是否清空/删除? - Does Cache Directory gets empted / deleted when app is updated?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM