Latest 0.4.0
Homepage https://github.com/grinder81/nfreachability
License MIT
Platforms ios 12.0
Frameworks Network
Authors

NFreachability

WWDC2018 Apple released Network Framework which is a low-level access of network layer. It’s providing lot of advance functionality and they are also encouraging developer to use it.

They are strongly discouraging to use SCNetworkReachability. Instead use NWPathMonitor. Here I just wrapped it to use as they described.

Installation

Manual

Just drop the NFReachability.swift file into your project.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. To install NFReachability.swift with CocoaPods:

  1. Make sure CocoaPods is installed.

  2. Update your Podfile to include the following:

    use_frameworks!
    pod 'NFReachability'
  3. Run pod install.

  4. In your code import NFReachability like so:
    import NFReachability

Example – closures

Closure are run on the main queue.

        let monitor = NFReachability()
        monitor.observeReachability { [weak self] status in
            print(status)
        }

LICENSE

MIT

Latest podspec

{
    "name": "NFReachability",
    "version": "0.4.0",
    "summary": "Using iOS Network framework we can predict the reachability much smarter way.",
    "description": "Using iOS Network framework we can predict the reachability much smarter way",
    "homepage": "https://github.com/grinder81/nfreachability",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Md Al Mamun": "[email protected]"
    },
    "source": {
        "git": "https://github.com/grinder81/nfreachability.git",
        "tag": "0.4.0"
    },
    "platforms": {
        "ios": "12.0"
    },
    "source_files": "Framework/NFReachability.swift",
    "swift_version": "4.2",
    "frameworks": "Network"
}

Pin It on Pinterest

Share This