简体   繁体   中英

iPhone iOS Dropbox SDK how to sync in background?

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.

  1. The backgrounding stuff could be found here (Try using it with GCD): Background tasks iPhone

  2. While CHDropboxSync probably fine, look into writing your own syncing code: Basic Syncing Algorithm

  3. Try doing manual requests with the Dropbox REST API if you can't get the Dropbox SDK to do it. See MGTwitterEngine for how to do OAuth and such.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM