Latest 1.0.1
Homepage https://github.com/mobilejazz/KnockKnock-iOS
License Apache License, Version 2.0
Platforms ios 7.0, requires ARC
Dependencies Reachability
Frameworks Foundation
Authors

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"

Project Maintainer

This open source project is maintained by Paolo Tagliani.

License

Copyright 2016 Mobile Jazz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Latest podspec

{
    "name": "KnockKnock",
    "version": "1.0.1",
    "summary": "Funny reachability interface",
    "description": "Knock is a simple but funny library that wraps the well known Reachability library. For more fun do [[Knock knock] knock].",
    "homepage": "https://github.com/mobilejazz/KnockKnock-iOS",
    "license": {
        "type": "Apache License, Version 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Mobile Jazz": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "social_media_url": "http://twitter.com/mobilejazzcom",
    "source": {
        "git": "https://github.com/mobilejazz/KnockKnock-iOS.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "Source Code/*.{h,m}"
    ],
    "frameworks": "Foundation",
    "dependencies": {
        "Reachability": [
            "~>3.2"
        ]
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This