Latest 1.0.0
Homepage https://github.com/whitesmith/WSReachability
License MIT
Platforms ios 8.0, requires ARC
Authors

Carthage Compatible
SwiftPM Compatible
CocoaPods Compatible
Swift 3.0
Platforms iOS
License MIT

Monitor the network state of an iOS device using the System Configuration.

Usage

Create an instance passing a host that you want to listen:

let reachability = WSReachability(forHost: "api.greatproject.io")

Listen for event changes:

reachability?.listen { reachable in
    print("Great Project API is reachable:", reachable)
}

It’s possible to log each event that’s occurring by subscribing it:

reachability?.log.subscribe { message in
    print("Reachability:", message)
}

Installation

Carthage

To install it, simply add the following line to your Cartfile:

github "whitesmith/WSReachability"

Then run carthage update.

Follow the current instructions in Carthage’s README
for up to date installation instructions.

CocoaPods

To install it, simply add the following line to your Podfile:

pod 'WSReachability'

You will also need to make sure you’re opting into using frameworks:

use_frameworks!

Then run pod install with CocoaPods 1.0 or newer.

Manually

Download all the source files and drop them into your project.

Requirements

  • iOS 8.0+
  • Xcode 7.3 (Swift 2.2)

Contributing

The best way to contribute is by submitting a pull request. We’ll do our best to respond to your patch as soon as possible. You can also submit a new GitHub issue if you find bugs or have questions. :octocat:

Credits

Whitesmith

Latest podspec

{
    "name": "WSReachability",
    "version": "1.0.0",
    "summary": "An iOS network state monitor",
    "homepage": "https://github.com/whitesmith/WSReachability",
    "license": "MIT",
    "authors": {
        "Ricardo Pereira": "[email protected]"
    },
    "source": {
        "git": "https://github.com/whitesmith/WSReachability.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/whitesmithco",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": [
        "WSReachability/*.{h}",
        "Source/**/*.{h,swift}"
    ],
    "pushed_with_swift_version": "2.2"
}

Pin It on Pinterest

Share This