Latest 1.0.0
Homepage https://github.com/mobilejazz/MJReachability
License MIT
Platforms ios 7.0
Dependencies Reachability
Authors

[![CI Status](http://img.shields.io/travis/Paolo Tagliani/MJReachability.svg?style=flat)](https://travis-ci.org/Paolo Tagliani/MJReachability)
Version
License
Platform

Usage

Start monitoring

To start monitoring reachability, just call the method awake on the shared reachability instance. Usually in your app delegate you start monitoring the network status:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *) launchOptions {
    //Started monitoring reachability
    [[MJReachability sharedReachability] awake];

   return YES;
}    

This method automatically start looking for reachability on Google.com. You could start monitoring reachability on a custom URL by calling the following method:

[[MJReachability sharedReachability] awakeWithHost:YOUR_HOST];

Check reachability

You can check reachability at any time by retrieving the shared reachability object and calling the
method isReachableVia:(MJReachabilityType)type, passing the desired reachability.

typedef NS_OPTIONS(NSUInteger, MJReachabilityType) {
    MJReachabilityTypeAny,
    MJReachabilityTypeWifi,
    MJReachabilityTypeCellular
};

Example project

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

MJReachability is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MJReachability"

Author

Paolo Tagliani, [email protected]

License

MJReachability is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MJReachability",
    "version": "1.0.0",
    "summary": "Mobile Jazz drop-in reachability solution",
    "description": "Simple library written by us at Mobile Jazz to monitor reachability.",
    "homepage": "https://github.com/mobilejazz/MJReachability",
    "license": "MIT",
    "authors": {
        "Paolo Tagliani": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mobilejazz/MJReachability.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "MJReachability/Classes/**/*",
    "dependencies": {
        "Reachability": [
            "~> 3.2"
        ]
    }
}

Pin It on Pinterest

Share This