Hacker News new | past | comments | ask | show | jobs | submit login
iOS Offline Manager
5 points by danielmorreil on June 8, 2015 | hide | past | favorite | 6 comments
Hello,

every app today need to be able to manage the offline scenario. The user modify the profile, if was offline then cache the call and make it when the App go online.

i was looking for some SDK that can be used in order to make any call in the most transparent way. But i got no lucky.

So i have start to build my Swift library to manage this scenario; but i'm continue to think that is not possibile that today do not exists an 'ready to use' library.

Any info?

d.




The Parse SDK allows you to save changes and have them sync with the server when internet connectivity comes back.


But i need to use my server, parse force me to implement the parse database.


You could try realm.io to persist data and implement synchronization manually.


I'm working to implement an SDK in Swift+Realm.io and make it general purpose.

myOfflineManager.POST( url, // the URL to call header:header, // [String:String] header for this call params:params, // [String:AnyObject] the body for the call storeResponse:true, // if i want to store the server response in the DB (for example to get Photo) fromCache:false); // if you found already an response into the DB then take it right now

For receiving the response I'm implementing NSNotificationCenter, so i know the status: queue // the call is putted into the DB progress // i'm starting the call done // call is done and of course the server response ;)

Everything is working right now, but ... is strange that there are no free open source SDK. Maybe i can release it on GIT.


You can try couchbase lite as well


After that I need to use Couchbase also on the server. I already have my API and my DB. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: