I know how to check internet connection. Tell me how to sync app data.
How does the synchronization works when internet is available ?
My confusion :
I have app which uses the web-service to display data on iPhone and also on site. Now I can update user's work when the net is available by calling web-service at same time when user does some task.
But when internet is not available, I have to keep user's data locally(say SQLite) in iPhone and when the internet is reachable I have to update all the data on server.
For Example,
If internet is reachable, user works on some task and I update the data on server at the dame time.
But Now internet is not reachable, user works on `N task`. I can not update on server, I have to wait for internet
How can I update all task on web-server at time?
So my question is :
How can I update all the data when net is available ?
Any link or code which can help me ?