KnockKnock 1.0.1

KnockKnock 1.0.1

Maintained by Mobile Jazz.



KnockKnock

[![CI Status](http://img.shields.io/travis/Paolo Tagliani/KnockKnock.svg?style=flat)](https://travis-ci.org/Paolo Tagliani/Knock) 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
    [[Knock knock] 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:

[[Knock knock] awakeWithHost:YOUR_HOST];

Check reachability

You can check reachability at any time by retrieving the shared reachability object and calling the method whosThere:(KKActor)actor, passing the desired reachability.

typedef NS_OPTIONS(NSUInteger, KKActor) {
    KKSomeone,
    KKWifi,
    KKCellular
};

##Example project

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

Installation

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

pod "KnockKnock"

License

Knock is available under the Apache license. See the LICENSE file for more info.