Latest 3.2.0
Homepage https://github.com/pdfun/Reachability
License BSD Copyright (c) 2011, Tony Million.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Platforms ios 6.0, requires ARC
Frameworks SystemConfiguration, CoreTelephony
Authors

Fork fromReachability.
Add function to get the type of Cellular(2G/3G/4G), Mobile Networks Operator(Mobile/Unicom/Telecom/Tietong)

 self.googleReach = [Reachability reachabilityWithHostname:@"www.google.com"];

    self.googleReach.reachableBlock = ^(Reachability * reachability)
    {
        NSString * temp = [NSString stringWithFormat:@"GOOGLE Block Says Reachable(%@)", reachability.currentReachabilityString];
        NSLog(@"%@", temp);

        // to update UI components from a block callback
        // you need to dipatch this to the main thread
        // this uses NSOperationQueue mainQueue
        [[NSOperationQueue mainQueue] addOperationWithBlock:^{
            weakself.blockLabel.text = temp;
            weakself.blockLabel.textColor = [UIColor blackColor];
        }];

        // 4G 3G 2G  WIFI
        NSLog(@"%@",[reachability distinguishReachable]);

        //Mobile Networks Operator
        NSLog(@"%@",[Reachability checkMobileOperators]);
    };

Latest podspec

{
    "name": "[email protected]",
    "version": "3.2.0",
    "summary": "[email protected]",
    "homepage": "https://github.com/pdfun/Reachability",
    "authors": {
        "pd": "[email protected]"
    },
    "license": {
        "type": "BSD",
        "text": "Copyright (c) 2011, Tony Million.nAll rights reserved.nnRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:nn1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.nn2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.nnTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.n"
    },
    "source": {
        "git": "https://github.com/pdfun/Reachability.git",
        "tag": "v3.2.0"
    },
    "source_files": "Reachability.{h,m}",
    "frameworks": [
        "SystemConfiguration",
        "CoreTelephony"
    ],
    "requires_arc": true,
    "platforms": {
        "ios": "6.0"
    }
}

Pin It on Pinterest

Share This