简体   繁体   English

iOS 状态保存/恢复能否在应用卸载和重新安装后继续存在?

[英]Does iOS state preservation/restoration survive app uninstall and reinstall?

If this differs between versions of iOS or different types of state preservation, please say so.如果这在不同版本的 iOS 或不同类型的状态保存之间有所不同,请说出来。

In this case, I'm using application:shouldSaveApplicationState: and application:shouldRestoreApplicationState: – I'm not sure if state preservation/restoration is the correct term.在这种情况下,我使用application:shouldSaveApplicationState:application:shouldRestoreApplicationState: – 我不确定状态保存/恢复是否是正确的术语。 (We're changing to application:shouldSaveSecureApplicationState: etc, but haven't released it yet.) (我们正在更改为application:shouldSaveSecureApplicationState:等,但尚未发布。)

I'm asking because I'm looking into an error report that suggests that maybe a user got a bad state restored even after reinstalling the app, but I can't reproduce it, and I wasn't able to find docs that clearly stated what to expect if reinstalling.我之所以这么问是因为我正在查看一份错误报告,该报告表明即使在重新安装应用程序后,用户也可能恢复了错误状态,但我无法重现它,而且我无法找到明确说明的文档如果重新安装会发生什么。

答案是否定的,它没有。

It wouldn't be be logical for it to persist after app uninstall, so no, it does not.在应用程序卸载后持续存在是不合逻辑的,所以不,它没有。

Please note application:shouldSaveApplicationState: and application:shouldRestoreApplicationState: are deprecated since iOS 13.2.请注意application:shouldSaveApplicationState:application:shouldRestoreApplicationState:自 iOS 13.2 起已弃用。

EDIT: By uninstall I mean the user actively removed the app.编辑:卸载是指用户主动删除了该应用程序。 I'm not talking about an app being off loaded by the iOS due to storage, at this case it is saved.我不是在谈论由于存储而被 iOS 卸载的应用程序,在这种情况下它被保存。 The whole topic is extremely vague in the Apple documentation.整个主题在 Apple 文档中非常模糊。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM