forem / DEV-ios

DEV Community iOS App
GNU General Public License v3.0
359 stars 97 forks source link

Add network awareness/offline support #103

Closed benhalpern closed 5 years ago

benhalpern commented 5 years ago

Currently if the network is slow to respond, the app sort of just craps out. We should add features to detect a poor network condition and display a banner that indicates the status and gives the user the option of retrying.

StriderHND commented 5 years ago

@benhalpern, the app has the responsibility to present the slow connection banner? our should be via web too? I would like to help with this.

chickdan commented 5 years ago

The app would be responsible since it can better detect the network status.

benhalpern commented 5 years ago

Yes. For all intents and purposes, the DEV iOS app is a specialized browser.

...Which I think is a pretty cool thing to be honest. The iOS app shouldn't have to know much about what is going on in the app, only that it was told to do something like "vibrate". And the web app shouldn't have to know much about how to respond to network conditions.

If service workers were fully supported in wkwebview that might give more responsibility to the web app, but as it is let's just take the view that the iOS app should handle network stuff without having to know too much about the context of the app.