Reputation: 331
I need to create an offline mode in my app.
User should be able to create new product with images and text data and send to server both in online and offline modes. Right now it works in online mode, but as for offline I need help. As far as I understand, here is what I should do:
How should I save multiple Alamofire upload with multipartFormData requests?
I have found this answer - SO Answer but it covers only simple post request without any files and my case is a bit complicated.
Would be grateful for code examples or any steps of how to save requests.
Here's how I'm checking Internet:
if Reachability.isConnectedToNetwork() {
print("Internet Connection Available!")
} else {
print("Internet Connection not Available!")
}
And in my class Reachability
I'm checking for Internet connection.
Many thanks in advance for your help!
Upvotes: 1
Views: 290
Reputation: 317
For your app to work in both online and offline modes, there are multiple options but I will mention some of them.
Upvotes: 1