0

I'm working with the CHDropboxSync example and got it to perform sync of my core data over to dropbox and back. It uses RestKit for object mapping. The current implementation relies on DBRequest for network operations, and is not background - task friendly.

Has anyone managed to get dropbox to sync files in background on iPhone? How can I get a list of DBRequests to execute once an application enters background mode? Is there something within the Dropbox SDK, like a request queue, that can be easily configured to continue executing in background?

I'm looking at ASIHTTPRequest, because it is capable of continuing in the background, but it seems like I'll have to rewrite quite a lot of code if I want to use that with the dropbox SDK.

I would imagine that including core data into the equation makes things a lot more complicated due to the whole NSManagedObjectContext and threading issues.

Thank you for any input! I'm very new to network based file synchronization, and would appreciate if someone can point me to a demo project that deals with dropbox sync in background.

4

1 回答 1

0
  1. 后台的东西可以在这里找到(尝试与 GCD 一起使用):Background tasks iPhone

  2. 虽然 CHDropboxSync 可能没问题,但请考虑编写自己的同步代码:基本同步算法

  3. 如果您无法让 Dropbox SDK 执行此操作,请尝试使用 Dropbox REST API 执行手动请求。请参阅 MGTwitterEngine 了解如何进行 OAuth 等。

于 2012-07-25T03:25:24.680 回答