This repository contains an iOS sample application demonstrating how to use SCNetworkReachabilityKit.
Using asynchronous notifications only, the application presents the status of three reachable networks:
- by name, specifically Apple,
- the Internet and
- the local-link wi-fi network.
Clone the repository in the usual way. It incorporates the SCNetworkReachabilityKit as a Git sub-module however. Hence you also need to initialise and update the submodule. From your local repository type:
git submodule update --init
Git will clone the appropriate repository as a submodule. You can now open the project using Xcode, build and run. Don't forget to set up the correct scheme: SCNetworkReachability » iPhone Simulator or iOS Device. iPad works too.
The following screenshots show you what the sample app looks like under different connectivity test conditions.
Mobile Data off, 3G off and Wi-Fi off. Everything disabled! Nothing reachable.
Mobile Data on, 3G off and Wi-Fi off. The iPhone picks up the local EDGE service, a slightly more advanced form of GPRS.
Mobile Data on and 3G on, but Wi-Fi off. The iPhone picks up the local 3G service—fast cellular Internet.
Mobile Data on and 3G on, and Wi-Fi on. The iPhone opts for the very fast broadband service available via wi-fi.