如何在iPhone和另一台计算机之间同步应用程序数据? [英] How do I sync application data between an iPhone and another computer?

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

问题描述

我正在开发一个iPhone应用程序,它允许查看和编辑我希望与桌面应用程序保持同步的数据。我在SDK中没有看到任何直接解决数据同步的问题,也没有找到任何允许我挂钩进入iTunes同步过程的内容。

I'm working on an iPhone application that would allow viewing and editing of data that I want to keep in sync with a desktop application. I don't see anything in the SDK that directly addresses data synchronization, nor can I find anything that allows my to "hook" into the iTunes sync process.

我可以做一些像在照片或地址簿条目中隐藏数据一样的东西,但这似乎是一个坏主意。我可以使用WebDAV或HTTP来获取/放置数据到服务器,但它使应用程序更复杂。

I could do something kludgy like hiding the data in a photo or address book entry, but that just seems like a bad idea. I could use WebDAV or HTTP to get/put data to a server, but it makes the application more complicated.

我想我期待这是一个常见的用途 - 适用于iPhone应用程序的情况(在桌面和iPhone之间同步任意应用程序数据),SDK中会有一组API来涵盖这一点。也许有,我找不到它。

I guess I was expecting this to be a common use-case for iPhone apps (syncing arbitrary application data between a desktop and the iPhone) and that there would be a set of APIs in the SDK that cover this. Maybe there is and I just can't find it.

推荐答案

两种流行的方法是:

通过WiFi直接与桌面应用程序同步(使用Bonjour等发现其他人在此处建议的iPhone /桌面应用程序端点)。

Sync with a desktop app directly via WiFi (using Bonjour etc. to discover the iPhone/desktop app endpoints as others have suggested here).

另一个选项是与共享文件位置同步 - FTP,MobileMe,WebDAV,另一台服务器上的Web服务等。因此,iPhone和桌面应用程序将读/写共享位置,以便其他人可以看到更新。

The other option is to sync with a shared file location - either FTP, MobileMe, WebDAV, web services on another server, etc. So the iPhone and desktop app would read/write to the shared location so the other can see the updates.

正如其他人所说的那样,此时没有Apple提供的方法(使用iTunes或其他方式),并且没有任何迹象表明在不久的将来会发生任何类似的事情。除非它与iPhone未来对第三方推送更新的支持捆绑在一起。 (我真的怀疑情况会如此,但你永远不会知道。)

As others have said, there is no Apple provided method (using iTunes or otherwise) at this point and no indication that anything along those lines will be happening in the near future unless it's bundled with the iPhone's future support for third-party push updates. (I really doubt this will be the case, but you never know.)

这篇关于如何在iPhone和另一台计算机之间同步应用程序数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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