【问题标题】:how to sych sqlite data with server in iOS app?如何在 iOS 应用程序中将 sqlite 数据与服务器同步?
【发布时间】:2014-01-05 07:03:12
【问题描述】:

我正在制作一个应用程序,将数据保存在 sqlite 中。现在根据最新要求,我想在我登录的其他设备上获取相同的数据。那么我应该遵循什么方式来保持所有设备的数据通用。应用离线,我们只能使用互联网进行同步。

I have done some part as :
 1. Make same database on PHP server.
 2. Save local data with flag isSynch=No.
 3. After saving it, when I connect to internet I make txt file of each table by fetching rows with isSynch=NO and on server side all these data gets dumped to database.
 4. After successful insertion of data on server, it makes txt files of all tables with flag isSynch=YES.
 5. Now all files get downloaded to local device and inserted to each table.

我可以使用 iCloud 吗?或者如果有任何其他解决方案,请告诉我。

【问题讨论】:

    标签: ios objective-c sqlite synchronization icloud


    【解决方案1】:

    Core Data 和 iCloud 应该会为你做这件事。您可以在设备之间同步 Core Data 数据库。我建议你阅读 Core Data,或者看看这里看一个使用 iCloud 同步的 Core Data 应用程序的视频。

    http://ossh.com.au/design-and-technology/software-development/uimanageddocument-icloud-integration/

    【讨论】:

      猜你喜欢
      • 2017-12-10
      • 1970-01-01
      • 2014-09-18
      • 2012-09-12
      • 1970-01-01
      • 2016-05-26
      • 1970-01-01
      • 2011-11-02
      • 1970-01-01
      相关资源
      最近更新 更多