iOS和Android之间的同步应用程序数据 [英] Sync application data between iOS and Android

查看:379
本文介绍了iOS和Android之间的同步应用程序数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有两个iOS和Android(包括手机和平板电脑)的工作的应用程序,而他们管理同步在不同设备上的数据。

  1. 是否有提供这种同步功能?
  2. 任何框架或库
  3. 如果不是,有什么不同的选项执行?
  4. 可以的iCloud可用于同步跨Android和iOS设备的应用程序数据?
解决方案
  

是否有提供这种同步功能的任何框架或库?

没有。有没有提供的那种跨平台同步的iCloud的为苹果设备的框架或库。

  

如果不是,有什么不同的选项执行?

  1. 请不要使用同步机制可言,并且使用网络服务来代替。这可能是有些情况下获得良好的解决方案。
  2. 在iOS和Android应用程序中使用SQLite数据库,并实现自己的同步解决方案。一些挑战,如果您选择实现自定义同步解决方案所遵循的,你要面对:
    • 提供注册机制,使用云/服务器端服务
    • 在读取和写入数据到/从服务器/云
    • 检测和解决冲突(即合并冲突)
    • 离线访问数据,和处理情况下,当设备没有连接到任何网络
    • 在iOS系统中,你将不能够使用的核心数据(这使得发展相对很容易的),所以你必须要照顾有效地显示数据,优化数据访问等
  

可以的iCloud可用于跨Android和iOS设备同步的应用程序数据?

没有。 iCloud的是仅适用于苹果设备(截至目前,2012年7月)。

There are applications that work on both iOS and Android (both Phone and Tablet), and they manage to sync the data across different devices.

  1. Are there any frameworks or libraries that provide this sync functionality?
  2. If not, what are the different options for implementation?
  3. Can iCloud be used for syncing application data across Android and iOS devices?

解决方案

Are there any frameworks or libraries that provide this sync functionality?

No. There are no frameworks or libraries that provide the kind of cross-platform sync that iCloud provides for Apple devices.

If not, what are the different options for implementation?

  1. Don't use the sync mechanism at all, and use web-services instead. This might be a good solution for some cases.
  2. Use SQLite database in iOS and Android applications, and implement a sync solution on your own. Some of the challenges that you'll face if you choose to implement a custom sync solution are following:
    • Provide a registration mechanism, to use the cloud/server side services
    • Reading and writing data to/from the server/cloud
    • Detecting and resolving conflicts (i.e. merge conflicts)
    • Offline access to the data, and handling situations when device is not connected to any network
    • In iOS, you won't be able to use Core-Data (that makes development relatively very easy), so you'll have to take care of displaying data efficiently, optimizing the data access, etc

Can iCloud be used for syncing application data across Android and iOS devices?

No. iCloud is only for Apple devices (as of now, July 2012).

这篇关于iOS和Android之间的同步应用程序数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆