Reactive Extensions for NWPathMonitor.
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
})
- RxSwift 5.0+
- Network
- iOS 12.0+
- Mac Catalyst 13.0+
- macOS 10.14+
- tvOS 12.0+
- watchOS 5.0+
- Xcode 10.0+
let package = Package(
name: "MyPackage",
products: [...],
dependencies: [
.package(url: "https://github.com/fumito-ito/RxNWPathMonitor.git", .upToNextMajor(from: "0.0.1"))
]
)
github "fumito-ito/RxNWPathMonitor" ~> 0.0.1
pod 'RxNWPathMonitor', '~> 0.0.1`
RxNWPathMonitor is available under the Apache License 2.0. See the LICENSE file for more detail.