Question

I'm considering using CouchBase Lite instead of CoreData for my OS X and iOS apps. However, I need to be sure whether I can sync the data between OS X and iOS apps via iCloud in case Couch Base Lite is used.

CoreData syncing is possible via iCloud. I hope it could be done for CouchBase Lite.

Was it helpful?

Solution

I don't know how CouchBase Lite writes data out, but your options with iCloud are Core Data, flat files, or NSUbiquitousKeyValueStore. If CouchBase Lite uses flat files, it should work, as long as you explicitly set every one of its files to be synced by iCloud and you can resolve any conflicting changes that might come up in those files. File sync over iCloud will sync files and notify you of conflicts, but resolving them is up to you.

Whether that makes it easy or difficult depends on the details of CouchBase Lite's data storage.

OTHER TIPS

If you are going to go with CouchBase, you should sync via a CouchBase server. Sync is a strength of CouchBase, and it would be silly not to take advantage of it.

Trying to use CouchBase via iCloud sounds like a bag-of-hurt. It wasn't designed for that purpose.

If you want to stick with iCloud, you can use Apple's Core Data sync, or a third party framework. TICDS and Ensembles are both based on Core Data, and can sync via iCloud. (Disclosure: I have contributed to both projects.)

Couchbase Lite was made for sync compatability with Couchbase Server; however, for folks who want to continue to utilize a relationship between iCloud and the device, and thereby need Core Data, we do have a Core Data adapter that you could use as migration or symbiosis with Couchbase Lite. Some sample work is available here: https://github.com/couchbaselabs/cblite-coredata-sample-ios

The adapter itself you can see here: https://github.com/couchbase/couchbase-lite-ios/tree/1.0-beta3/Source/API/Extras

  • Jessica
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top