fumito-ito / RxNWPathMonitor

Reactive Extensions for NWPathMonitor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RxNWPathMonitor

Reactive Extensions for NWPathMonitor.

Usage

You can now subscribe your path status just like below:

// it depends Network.framework and iOS 12 or later
import Network

NWPathMonitor(requiredInterfaceType: .wifi).rx
    .pathUpdate()
    .subscribe(onNext: { path in
        // detect network status with NWPath
    })

Dependencies

Frameworks

SDKs

  • iOS 12.0+
  • Mac Catalyst 13.0+
  • macOS 10.14+
  • tvOS 12.0+
  • watchOS 5.0+
  • Xcode 10.0+

Installation

Swift Package Manager

let package = Package(
    name: "MyPackage",
    products: [...],
    dependencies: [
        .package(url: "https://github.com/fumito-ito/RxNWPathMonitor.git", .upToNextMajor(from: "0.0.1"))
    ]
)

Carthage

github "fumito-ito/RxNWPathMonitor" ~> 0.0.1

Cocoapods

pod 'RxNWPathMonitor', '~> 0.0.1`

RxNWPathMonitor is available under the Apache License 2.0. See the LICENSE file for more detail.

About

Reactive Extensions for NWPathMonitor

License:Apache License 2.0


Languages

Language:Ruby 52.7%Language:Swift 38.2%Language:Objective-C 9.1%