Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

ARC and non-ARC compatible URGNetworkReachability Class for iOS

Notifications You must be signed in to change notification settings

adobkin/URGNetworkReachability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

URGNetworkReachability

URGNetworkReachability is simple class for monitoring Reachability of network for iOS. Class compatible with ARC and non-ARC

A Simple example

  URGNetworkReachability *reach = [[URGNetworkReachability alloc] init];

  // set the block
  reach.reachabilityChangedBlock = ^(URGNetworkReachability *reach) {
      NSString *status = nil;
      if (reach.isReacheble) {
         if (reach.isReachebleViaWiFi) {
            status = @"network is reachable via WiFi";
         } else {
            status = @"network is reachable via Cellular";
         }
      } else {
         status = @"network is unreachable";
      }
      NSLog(@"%@", status);
  };
			
  [reach startNotifier];

Use

- Add URGNetworkReachability.h and URGNetworkReachability.m files to your project 
- Add SystemConfiguration.framework to your project

About

ARC and non-ARC compatible URGNetworkReachability Class for iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published