iPhone数据迁移和应用程序设计
我正在开发一个附带只读数据库的应用程序。
用户将运行该应用程序,并能够从数据库中选择一系列“收藏夹”,这些收藏夹将出现在“收藏夹”选项卡栏部分中。即存储主键。
每次更新应用程序时,只读数据可能会包含更多条目或修复拼写错误等内容。
我正在使用核心数据,但我不确定是否也使用它来存储用户的“收藏夹”。至于 - 以我的思维方式 - 这可能会给迁移带来麻烦。是这样吗?
我是否应该考虑将“收藏夹”存储在 plist 中并执行某种查询来检索记录?有什么建议吗?
另外,iPhone 应用程序的哪些内部部分在更新期间会保留(或可以保留)?
唷,我想就是这样。
感谢您可能有的任何答案。
干杯, 马特
I'm working on an application that has a read-only database shipped with it.
The user will run the application and be able to select a series of "favourites" from the database which will appear in there "favourites" tab bar section. I.e. storing the primary keys.
With each update to the application the read only data will potentially contain more entries or have things like spelling mistakes fixed etc.
I'm using Core Data but I'm unsure whether to use it for storing the users "favourites" as-well. As - to my way of thinking - this might cause headaches for migration. Is this the case?
Should I consider storing the "favourites" in a plist perhaps and perform some sort of query to retrieve the records? Any recommendations?
Also what internal pieces of an iphone application are kept (or can be kept) during an update?
Phew I think that's it.
Thanks for any answers you might have.
Cheers,
Matt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要将应用程序移植到另一个平台,那么 Core Data 并不是最佳选择。由于我们谈论的是静态数据库,所以我会保持简单 - 读取一次,用它做你需要的事情,然后关闭它,然后忘记它。不像真正的数据库,您需要执行多次 GET 以及一定量的添加、修改和删除操作。
你的数据库也可以是一个plist。用户选择他们最喜欢的内容后,您可以轻松地将它们存储在另一个 plist 中。该文件夹位于 Documents 或 Prefs 文件夹中。
当您发布新应用程序时,您可能应该将收藏夹与新条目进行比较,以纠正任何拼写错误或其他更改(如果适用)。
我相信您的应用程序已被替换,但您的文档和首选项文件夹保持不变。
If you're going to port the app to another platform, then Core Data is not the way to go. And since we are talking about a static database, I'd keep it simple - read it once, do what you need with it and close it and forget about it. Not like a real database where you're doing multiple GETs and some amount of additions, modifications and deletions.
Your database could be a plist too. After the user selects their favourites, you can easily store them in yet another plist. This one goes in the Documents or Prefs folder.
When you release a new app, you should probably compare the favourites with the new entries to correct any typos or other changes, if applicable.
I believe that your app is replaced but your Documents and Preferences folders are kept intact.