2

I am working on Core Data app which needs to sync data to various platforms including the web. Initially I started integrating Stackmob which seemed a fine candidate to handle this task. Now that Stackmob is apparently shutting down I'm looking for another BaaS framework/service as a replacement. Everyone is suggesting to use Parse.com but parse is an 'always online' service which does not support offline sync. The users of my app need to be able to use the app offline, and sync the cached data as soon as the device has internet connection.

Building my own syncing backend is not an option at this moment since I'm a small developer who has not the time nor the resources to do this. What are my options, are there any similar services which support offline sync for Core Data ?

note: I can't use iCloud since I want to sync to the web.

update: I stumbled upon Simperium which seems to do offline Core Data syncing. Anyone having any experience with this service ?

Oysio
  • 3,486
  • 6
  • 45
  • 54
  • Parse.com offers the ability to use a local cache for all your data, and you can specify that you want to hit the network before cache. This means that if network is down, your app will still work against the cache. – Marius Waldal Feb 17 '14 at 11:56
  • Another solution is, as I have done in one of my apps, to use Core Data in conjunction with Parse. One part of my app must always be accessible, so those data are stored in Core Data AND parse.com. When the app loads, it checks for updated remote data, and syncs if it finds any. – Marius Waldal Feb 17 '14 at 11:57
  • Doing the syncing manually is indeed an option but IMO only feasible if your CoreData schema is kept very simple. My schema is quite complex with lot's of relations and multiple tables. Building a syncing engine which does resolve conflicts and merging will require a big effort and take a long time. – Oysio Feb 17 '14 at 12:48
  • Agreed. In that case, I should think the cache feature should be what you need. http://blog.parse.com/2011/09/30/easy-caching-with-parse/ – Marius Waldal Feb 17 '14 at 13:46
  • Thanks for the link. But Parse's caching does not seem to do syncing as well. – Oysio Feb 17 '14 at 13:58
  • I am looking into parse.com myself. Is there a reason that parse.com's saveEventually won't work here? What do you mean it doesn't sync very well? See http://stackoverflow.com/questions/13645666/objective-c-dynamic-methods-at-runtime. – SilentNot Feb 17 '14 at 15:45
  • I think it's generally a good idea not to couple the app too tightly with Parse. – fatuhoku Mar 27 '14 at 10:36

2 Answers2

4

I would suggest the Dropbox Datastore API. You can use the ParcelKit wrapper which allows you to use Core Data. This gives you everything you need: offline use, Core Data, and a Javascript API for your web component.

There is also Wasabi Sync, which is Core Data-native, and has a REST API for web use.

If you can drop the requirement for web, there are solutions like Ensembles and TICDS, which work with multiple backends (e.g. iCloud, Dropbox). (Disclosure: I develop Ensembles)

Drew McCormack
  • 3,490
  • 1
  • 19
  • 23
  • Dropbox Datastore seemed at first a fine candidate but apparently it does not support multi-user collaboration which is a deal-breaker for my app. – Oysio Feb 18 '14 at 09:48
  • I should add that there is nothing stopping multiple users sharing a store with Ensembles. It is backend agnostic, and is just a question of adopting a multi-user backend. That said, you still have the issue of it not working with the web. – Drew McCormack Feb 19 '14 at 08:06
1

There is an open source package called FTASync that syncs Parse with CoreData. I looked at using it, but it was too simplistic for my app. Although I am a lone developer like you I took on the task of modifying FTASync into what I need. I have it pretty much finished now and it is very different from FTASync. If FTASync is not sufficient for you, contact me privately and perhaps we can work something out.

-Bob

LostInTheTrees
  • 1,135
  • 9
  • 19
  • I have no idea how to contact you. But I know about FTASync and did some small tests with it. Unfortunately the library seemed quite immature, syncing did not work as expected and crashed frequently especially when using data relations. – Oysio Feb 18 '14 at 09:46
  • Sorry, I assumed there was a "Private Message" capability somewhere on SO, but I can't find one. Try bob in the domain theralynx dot com. – LostInTheTrees Feb 19 '14 at 16:36