Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Synchronize Directory of Files Between Server and iOS Application

I am building an internal iOS application (so - it won't ever be in the app store), and I need to keep a directory of content synchronized between a server and each of the instances of the iOS application. This would be easy enough if I just wanted to delete and re-download this content each time, but I would rather use something similar to rsync to only download the elements that have changed.

I haven't found any good way to utilize rsync. I considered looking at Objective-Git as a possibility here, but at a quick glance it looked like there is still a lot of the support for remote repositories that isn't supported yet.

As a final note, while this won't be in the app store, I will not be jailbreaking these devices and I would prefer to not rely on any private API's (although if there was an elegant solution that utilized private API's I might consider it).

Thoughts?

ADDITIONAL NOTE: This needs to be an isolated solution. I won't be relying on outside services (like Dropbox, Box.net, etc...). This needs to work solely between the device and the server (which is on a local network with the device).

like image 256
dtuckernet Avatar asked Oct 18 '12 14:10

dtuckernet


1 Answers

Use HTTP to list the contents of each folder on the server. Compare last modification time of each file with those on the device, and identify added/removed files. Get added and modified files, remove deleted files.

like image 64
Minthos Avatar answered Sep 21 '22 20:09

Minthos