Realm Swift: Is it possible to keep database after the apps is uninstalled?

牧云@^-^@ 提交于 2019-12-01 16:34:44

Applications all files are leftover when deleting an app. iOS apps are Sandboxed. This means that each App has its own space in disk, with its own directories, which act as the home for the app and its data.

Deleting an app from the iPhone deletes this sandbox, deleting all data associated with the app.

Sadly not. This is a limitation of iOS more than a limitation of Realm. When an iOS app is uninstalled from a device, all of the files associated with it are deleted (including any Realm files).

If you want file data to persist even after the app is deleted, you'll need to look at a cloud hosting solution to hang onto a copy of those files. In this case, the easiest one would most likely be CloudKit.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!