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.
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.