iOS Checking for Network Connectivity Add observer to network changes

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

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

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil];

Elsewhere in your class, implement method signature

- (void) reachabilityChanged:(NSNotification *)note {
    //code which reacts to network changes
}


Got any iOS Question?