Reputation: 31
I need to sync application on a few iOS devices. My app manages audio, video and images data(up to 50 Mb). I'm using core data to save media files filesystem paths locally. But how do I should save media to sync with other devices? I thought about storing all data (including serialized to NSData all audio, video, image files) in core data and using core data with iCloud together... But I think it bad practice... Also I thought about storing all media files in iCloud using NSFileManager's api but how do I now when new files will come...
Please give me advice in solving my problem.
Upvotes: 2
Views: 684
Reputation: 23
It might be worth considering DropBox's Sync API for iOS-
https://www.dropbox.com/developers/sync/start/ios
They've implemented a solution for syncing files that, while it may not be a viable commercial option for your project, it's free to experiment with and the code is worth taking a look at to get some ideas.
OR
Your app could intermittently poll your own server or iCloud to check for updates (on startup, every hour, etc).
Apple also has Push notifications, while pretty reliable, there's no guaranteed delivery of every message, so polling might be the surest way to check sync.
Upvotes: 1