OGeek|极客世界-中国程序员成长平台

标题: ios - 删除应用程序不应删除文档目录 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 12:13
标题: ios - 删除应用程序不应删除文档目录

如果 iOS 应用程序未安装或任何替代方式,有什么方法可以不删除文档目录

有什么方法可以将数据保存在不同的地方,以便删除应用后我们可以使用它?



Best Answer-推荐答案


不,一旦您卸载应用程序,就无法阻止系统删除文档文件夹

如果设备中启用了 iCloud,它将备份 Documents 目录的内容。 iCloud 方式是最高效的,因为它会自动处理文档文件夹内容,它会在重新安装后将数据从备份中恢复,因此您可以重复使用它。

Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the /Documents directory and will be automatically backed up by iCloud.

更多:https://developer.apple.com/icloud/documentation/data-storage/index.html

用户可能还使用 iTunes 备份了这些数据。

阅读有关文件系统和逻辑的更多信息:

https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

关于ios - 删除应用程序不应删除文档目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39697810/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4