Skip to content

SKReachability is a singleton that gives quick access to information about the connection.

License

Notifications You must be signed in to change notification settings

khanlou/SKReachability

Repository files navigation

SKReachability

SKReachability is a singleton that gives quick access to information about the connection.

Usage

Usage is simple. Call [SKReachability sharedReachability] to initialize the singleton. Set the host property to test connection to a specific host. It defaults to the Google homepage.

Subscribe to notifications for reachability changes:

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

and then you can access the properties radioPoweredOn, connectedToInternet, connectedViaWifi, and connectedToHost when the notification is fired. You can also access them at any point to determine the state of the network.

SKReachability relies on Apple's Reachability.

About

SKReachability is a singleton that gives quick access to information about the connection.

Resources

License

Stars

Watchers

Forks

Packages