The existing "no internet connection" notification doesn't work properly when detecting if connection has been recovered, which leads to the notification still showing up despite having internet connection.
A potential improvement could be to add tappable behaviour to the notification: If tapped, we can directly check if there's connection, rather than relying on observing the reachability state.
This fits Apple's recommendation of "do not attempt to guess whether network service is available, and do not cache that determination [...] The SCNetworkReachability API is not intended for use as a preflight mechanism for determining network connectivity. You determine network connectivity by attempting to connect."
To replicate:
In POS mode, turn off the internet
Turn it back on.
Observe that the notification state is not updated immediately.
The existing "no internet connection" notification doesn't work properly when detecting if connection has been recovered, which leads to the notification still showing up despite having internet connection.
A potential improvement could be to add tappable behaviour to the notification: If tapped, we can directly check if there's connection, rather than relying on observing the reachability state.
This fits Apple's recommendation of "do not attempt to guess whether network service is available, and do not cache that determination [...] The SCNetworkReachability API is not intended for use as a preflight mechanism for determining network connectivity. You determine network connectivity by attempting to connect."
To replicate: