1

I have an app, which requires a data base of about 400.000 data entries, which change from time to time (like once per month). The total size of these data is about 20MB. We want to enable the user to:

  • download all data at once for offline mode
  • download individual data on demand and cache them on client side for offline mode
  • check for validity of individual data sets
  • build an index in order to quickly search through data

What is best practice to handle these requirements on iOS?

  1. Is there an existing framework which cares about these requirements?
  2. What would be the recommended technology set for these requirements? Like SQLite or something.
4

1 回答 1

3

您应该随应用程序提供数据库的副本。您真的不希望每个用户都必须等待 20MB 下载完成才能使用您的应用程序。

至于不频繁更新,请提供一个 API 端点,您的应用可以使用日期参数调用该端点,并返回自提供日期以来的所有新/更新记录。还提供一个端点,该端点将最后一次更改的日期返回到主数据库。然后,您可以使用此日期检查设备上数据的有效性(假设设备数据是只读的)。

iOS 的主要存储选项是 SQLite 或Core Data。至于将为您处理同步的框架,如果您在设备上选择 Core Data,则可以选择TICoreDataSync 。

于 2013-10-09T15:05:59.127 回答