如何使用 Core Data 和 iOS 5 存储指南?
我编写了一个应用程序,允许用户在 Core Data 中存储文本文章。我正在使用 sqlite 后备存储。
那么什么是“数据类别”,正如这篇技术说明中提到的(登录可能是必需的),我的.sqlite数据应该落入吗?
我认为“关键数据”不应标记为“不备份”。同意吗?不过,我还为用户提供了大约一千个条目。这些条目在技术上是“可重新生成的”,并且应标记为“不备份”。问题是有一个 SQLite 文件支持我的核心数据存储,并且其中有两种数据。
现在怎么办?我是否将数据库标记为“不备份”并冒丢失用户数据的风险,或者我是否将其标记为“不备份”并冒着审查团队愤怒的风险,理由是我没有遵循iOS数据存储指南?
I wrote an app that allows users to store text articles in Core Data. I'm using a sqlite backing store.
So what "category of data", as mentioned in this technical note (login may be required), should my .sqlite data fall into?
I would think "Critical Data" that should not be marked "do not back up". Agreed? However, I also seed the user with about a thousand entries. These entries are technically "regeneratable" and should be marked "do not back up". The problem is that there is one SQLite file backing my Core Data store, and two kinds of data in it.
Now what? Do I mark the database as "do not back up" and risk losing user data, or do I not mark it as "do not backup" and risk the wrath of the review team, on the grounds that I didn't follow the iOS Data Storeage Guidelines?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想考虑一下,如果用户在没有网络连接的飞机上,在低存储情况下清除数据后启动应用程序,会发生什么?
如果答案是“应用程序无法运行”,则不包括临时数据或缓存数据。然后您唯一的决定是是否要备份到 iCloud。这更多是因为用户因为占用了部分宝贵的 5GB 存储空间而感到愤怒。
I like to consider what would happen if a user, on board an airplane with no network connectivity, started the app after a data purge in a low storage situation?
If the answer is "the app wouldn't work", then that excludes temporary or cached data. Your only decision then is do you want to back up to iCloud or not. This is more about the wrath of your user for taking up some of their valuable 5GB storage.
您的案例是否属于“CoreData 和 iCloud”类别,其中您的数据在应用程序修改数据时作为差异同步(但这也意味着我认为在设备之间真正同步):
http://developer.apple.com/library/ios/#releasenotes/DataManagement/RN-iCloudCoreData/_index.html
Could your case fall under the "CoreData and iCloud" category where your data is synced as diffs as your app modifies them (but this also means really syncing between devices I think):
http://developer.apple.com/library/ios/#releasenotes/DataManagement/RN-iCloudCoreData/_index.html