Suppose I have some data I want to post to a server. You’re in a deep, deep underground cellar (or you use t-mobile) and you have no internet connection. Where does that data go? Just leave it there and wait for a connection? I would rather save that data, and make it available for upload the second you have a connection.
Would using SQlite be the best way of doing this? It’s just a couple of objects i want to temporarily store.
Well that is up to you, apple specifies you need to check if there is an internet connection available. And you will receive error’s if you request fails.
If you can send the data later just save it and retry later. If you can’t send the data on a later date then inform the user that the data could not be send.
It all depends on the specifications of the app.
I’ve uses plist, SQLite and coredata to keep data on the device and send them to the server when a network connection becomes available.
If you all ready store the data in database just add a bit which tells you if you have send the data to a server, or beter yet get the server to return you an identifier for the upload so you may update some record later on.