如果 CoreData sqlite + iCloud 损坏,是否有从 iCloud 备份我的 sqlite 信息的好方法?将 .sqlite 复制到另一个位置?当 iCloud 损坏时,从 .sqlite 中读取数据以创建新的 iCloud sqlite?
最佳答案
使用 migratePersistentStore API 在 devices/Documents 目录中创建存储文件的副本,它将在其中进行备份。请在此处查看更完整的说明和示例应用。
关于ios - 有没有一种通过 iCloud 集成备份 Core Data 数据库的好方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15694426/