<commit_before># SANetworkTester

[![Version](http://cocoapod-badges.herokuapp.com/v/SANetworkTester/badge.png)](http://cocoadocs.org/docsets/SANetworkTester)
[![Platform](http://cocoapod-badges.herokuapp.com/p/SANetworkTester/badge.png)](http://cocoadocs.org/docsets/SANetworkTester)

SANetworkHelper makes your life easier to test network connection on a iOS device without having to spend time writing lots of code. Its has a few simple class methods that run in a background thread and return the response of the network by either using Block or Delegate.

Example method with Block:

    [SANetworkTester googleDNSWithCompletion:^(NSNumber *response) {
        // handle success
        [self showAlert:[NSString stringWithFormat:@"Received %@ packets", response]];
        
    } errorHandler:^(NSString *address, NSError *error) {
        // handle error
        [self showAlert:[NSString stringWithFormat:@"Failed %@ wError: %@", address, error.localizedDescription]];

    }];

Example method with Delegate:

1. #import < SANetworkTester.h >
2. add Delegate to class: <SANetworkTesterDelegate>
3. add two optional protocol methods: - (void)didFailToReceiveResponseFromAddress:(NSString *)address withError:(NSError *)error; and - (void)didReceiveResponse:(NSNumber *)response;
5. add method to run test: [SANetworkTester googleDnsWithDelegate:self];

## Screenshot
<img src="https://raw.githubusercontent.com/shams-ahmed/SANetworkTester/master/Resources/Screenshot.png">

## Usage

To run the example project; clone the repo, and build the exmaple project.

## Requirements

## Installation

SANetworkTester is available through [CocoaPods](http://cocoapods.org), to install
it simply add the following line to your Podfile:

    pod "SANetworkTester"

Or directly drag and drop the Source folder and add these framework: 'CFNetwork', 'MobileCoreServices', 'SystemConfiguration'

## Author

shams-ahmed, <EMAIL>

## License

SANetworkTester is available under the MIT license. See the LICENSE file for more info.
<commit_msg>Add a Bitdeli badge to README<commit_after># SANetworkTester

[![Version](http://cocoapod-badges.herokuapp.com/v/SANetworkTester/badge.png)](http://cocoadocs.org/docsets/SANetworkTester)
[![Platform](http://cocoapod-badges.herokuapp.com/p/SANetworkTester/badge.png)](http://cocoadocs.org/docsets/SANetworkTester)

SANetworkHelper makes your life easier to test network connection on a iOS device without having to spend time writing lots of code. Its has a few simple class methods that run in a background thread and return the response of the network by either using Block or Delegate.

Example method with Block:

    [SANetworkTester googleDNSWithCompletion:^(NSNumber *response) {
        // handle success
        [self showAlert:[NSString stringWithFormat:@"Received %@ packets", response]];
        
    } errorHandler:^(NSString *address, NSError *error) {
        // handle error
        [self showAlert:[NSString stringWithFormat:@"Failed %@ wError: %@", address, error.localizedDescription]];

    }];

Example method with Delegate:

1. #import < SANetworkTester.h >
2. add Delegate to class: <SANetworkTesterDelegate>
3. add two optional protocol methods: - (void)didFailToReceiveResponseFromAddress:(NSString *)address withError:(NSError *)error; and - (void)didReceiveResponse:(NSNumber *)response;
5. add method to run test: [SANetworkTester googleDnsWithDelegate:self];

## Screenshot
<img src="https://raw.githubusercontent.com/shams-ahmed/SANetworkTester/master/Resources/Screenshot.png">

## Usage

To run the example project; clone the repo, and build the exmaple project.

## Requirements

## Installation

SANetworkTester is available through [CocoaPods](http://cocoapods.org), to install
it simply add the following line to your Podfile:

    pod "SANetworkTester"

Or directly drag and drop the Source folder and add these framework: 'CFNetwork', 'MobileCoreServices', 'SystemConfiguration'

## Author

shams-ahmed, <EMAIL>

## License

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



[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/shams-ahmed/sanetworktester/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

{'fraction_non_alphanumeric': 0.10461538461538461, 'fraction_numerical': 0.003076923076923077, 'mean_word_length': 5.037142857142857, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '392623', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1275, 'n_words': 373}