I need something similar to Facebook's offline post capabilities. Basically I want users to create content locally on the device regardless of connection state, and whenever internet becomes available it should POST/PUT to the server.
I've searched the internet for a solution and I found that NSURLSessionUploadTask
can be used for POST-ing in the background. But I couldn't figure out if the following scenarios are supported:
- Will my task remain in the background queue when the user is offline and will the operating system try to execute items in the queue upon reconnecting with a network?
- What happens if the application is force-closed by the user or crashes?
- What happens if the operation fails?