Checking for network connectivity iOS

Mr.Javed Multani
1 min readOct 3, 2020

Creating a Reachability listener

Apple’s Reachability class periodically checks the network status and alerts observers to changes.

Reachability *internetReachability = [Reachability reachabilityForInternetConnection];
[internetReachability startNotifier];

Add observer to network changes

Reachability uses NSNotification messages to alert observers when the network state has changed. Your class will need to become an observer.

[[NSNotificationCenter defaultCenter]…

--

--

Mr.Javed Multani

Software Engineer | Certified ScrumMaster® (CSM) | UX Researcher | Youtuber | Tech Writer