Reputation: 27123
I need to create offline module that will store all my requests and then when Internet connection will be available the module will make request one by one to the server.
Right now I am working with Core Data and AFNetworking 2.0, but I am working online. So the online algorithm is next:
But offline algorithm has a small different:
The main thing unique identifier and relationships which need to update after temp object will synchronized with the object on the backend.
My question is there already made solution how to sync offline data with the server?
Or maybe you have better algorithm it is also ok for me )
Upvotes: 6
Views: 3355
Reputation: 6011
I would suggest the following flow:
Before activating the manager, you could query the store for pending requests and cancel/delete the ones that are no longer relevant.
Upvotes: 11