DEV Community

Handling internet connection reachability in Swift

Neo on January 30, 2018

More often than not, mobile applications need an active internet connection to function properly. It is normal, however, for the internet connectio...
Collapse
 
hoangvu23108 profile image
Ken Lâm

Great article

But I found something, here is should stopNotifier() instead of startNotifier()

 static func stopNotifier() -> Void {
            do {
                // Stop the network status notifier
                try (NetworkManager.sharedInstance.reachability).startNotifier()
            } catch {
                print("Error stopping notifier")
            }
        }
Collapse
 
jetfighter profile image
Maxim Korotkov

👏

Collapse
 
neo profile image
Neo

Thanks Maxim

Collapse
 
its_junaid715 profile image
Junaid Khan

awesome