Swiftpack.co - vsanthanam/NetworkReachability as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by vsanthanam.
vsanthanam/NetworkReachability 1.1.1
Modern Network Reachability in Swift using Structured Concurrency
⭐️ 2
🕓 1 week ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/vsanthanam/NetworkReachability.git", from: "1.1.1")


NetworkReachability is a replacement for Apple's SystemConfiguration Network Reachability APIs. Because these APIs were originally written in C, they are quite old and cumbersome to use from Swift. In 2018, Apple added the Network framework which introduced the NWPathMonitor class. This API addressed some of the problems with SCNetworkReachability, but was still cumbersome to integrate into many commonly used app patterns. NetworkReachability wraps both these APIs in easy to use Swift wrappers with similar interfaces and features that will be familiar to most iOS developers. Using NetworkReachablity, you can easily integrate reachability observation into your app's pipeline using just a few lines of code.

NetworkReachability supports synchronous reachability queries, as well as constant asynchronous reachability observation via the following mechanisms:

NetworkReachability supports RxSwift bindings with an optional additional package: NetworkReachabilityRxSwift. This optional package exists so that you can safely depend on NetworkReachability without also depending on RxSwift if you don't need to. NetworkReachability itself has no non-apple dependencies.


NetworkReachability is currently distributed exclusively through the Swift Package Manager.

To add NetworkReachability as a dependency to an existing Swift package, add the following line of code to the dependencies parameter of your Package.swift file:

dependencies: [
    .package(url: "https://github.com/vsanthanam/NetworkReachability.git", from: "1.0.0")

To add NetworkReachability as a dependency to an Xcode Project:

  • Choose FileAdd Packages...
  • Enter package URL https://github.com/vsanthanam/NetworkReachability.git and select your release of choice.

Other distribution mechanisms like CocoaPods or Carthage may be added in the future.

Usage & Documentation

NetworkReachability's documentation is built with DocC and included in the repository as a DocC archive. The latest version is hosted on GitHub Pages and is available here.


Additional installation instructions are available on the Swift Package Index


NetworkReachability is available under the MIT license. See the LICENSE file for more information.


Stars: 2
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1 week ago

Add APIs for Host, Socket monitoring to ReachabilityMonitor

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics