iPhone数据迁移和应用程序设计

发布于 2024-08-05 01:11:11 字数 364 浏览 1 评论 0原文

我正在开发一个附带只读数据库的应用程序。

用户将运行该应用程序,并能够从数据库中选择一系列“收藏夹”,这些收藏夹将出现在“收藏夹”选项卡栏部分中。即存储主键。

每次更新应用程序时,只读数据可能会包含更多条目或修复拼写错误等内容。

我正在使用核心数据,但我不确定是否也使用它来存储用户的“收藏夹”。至于 - 以我的思维方式 - 这可能会给迁移带来麻烦。是这样吗?

我是否应该考虑将“收藏夹”存储在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

要走干脆点 2024-08-12 01:11:11

我正在使用核心数据,但我不确定
是否使用它来存储
用户也“最喜欢”。至于我的
思维方式 - 这可能会导致
为迁移而头痛。这是吗
案例?

如果您要将应用程序移植到另一个平台,那么 Core Data 并不是最佳选择。由于我们谈论的是静态数据库,所以我会保持简单 - 读取一次,用它做你需要的事情,然后关闭它,然后忘记它。不像真正的数据库,您需要执行多次 GET 以及一定量的添加、修改和删除操作。

我应该考虑存储
也许是 plist 中的“收藏夹”
执行某种查询来检索
记录?有什么建议吗?

你的数据库也可以是一个plist。用户选择他们最喜欢的内容后,您可以轻松地将它们存储在另一个 plist 中。该文件夹位于 Documents 或 Prefs 文件夹中。

当您发布新应用程序时,您可能应该将收藏夹与新条目进行比较,以纠正任何拼写错误或其他更改(如果适用)。

还有 iPhone 的内部部件
申请被保留(或可以保留)
更新期间?

我相信您的应用程序已被替换,但您的文档和首选项文件夹保持不变。

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?

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.

Should I consider storing the
"favourites" in a plist perhaps and
perform some sort of query to retrieve
the records? Any recommendations?

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.

Also what internal pieces of an iphone
application are kept (or can be kept)
during an update?

I believe that your app is replaced but your Documents and Preferences folders are kept intact.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文