{"id":28185887,"url":"https://github.com/vsanthanam/networkreachability","last_synced_at":"2025-05-16T06:12:52.891Z","repository":{"id":37936186,"uuid":"492322024","full_name":"vsanthanam/NetworkReachability","owner":"vsanthanam","description":"Modern Network Reachability in Swift using Structured Concurrency","archived":false,"fork":false,"pushed_at":"2025-03-30T11:31:37.000Z","size":20673,"stargazers_count":22,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-10T04:01:55.613Z","etag":null,"topics":["async","await","combine","ios","macos","reachability","spm","structured-concurrency","swift","tvos","watchos","xcode"],"latest_commit_sha":null,"homepage":"https://reachability.tools","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsanthanam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-05-14T20:47:12.000Z","updated_at":"2025-05-06T19:29:55.000Z","dependencies_parsed_at":"2024-03-30T16:44:58.938Z","dependency_job_id":null,"html_url":"https://github.com/vsanthanam/NetworkReachability","commit_stats":{"total_commits":89,"total_committers":1,"mean_commits":89.0,"dds":0.0,"last_synced_commit":"918943ba196327e1256a8f2b7e8b922651488607"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FNetworkReachability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FNetworkReachability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FNetworkReachability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FNetworkReachability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsanthanam","download_url":"https://codeload.github.com/vsanthanam/NetworkReachability/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478025,"owners_count":22077679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","await","combine","ios","macos","reachability","spm","structured-concurrency","swift","tvos","watchos","xcode"],"created_at":"2025-05-16T06:12:48.688Z","updated_at":"2025-05-16T06:12:52.886Z","avatar_url":"https://github.com/vsanthanam.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetworkReachability\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"330\" height=\"190\" src=\"Images/Card.svg\"\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/vsanthanam/NetworkReachability/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/vsanthanam/NetworkReachability\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/vsanthanam/NetworkReachability/releases\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/vsanthanam/NetworkReachability\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/vsanthanam/NetworkReachability/actions/workflows/spm-build-test.yml\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/vsanthanam/NetworkReachability/spm-build-test.yml\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swift.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/swift-5.8-critical\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://developer.apple.com\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/platform-iOS%2011%20%7C%20macOS%2010.13%20%7C%20tvOS%2011%20%7C%20watchOS%205-lightgrey\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nNetworkReachability is a replacement for Apple's [SystemConfiguration](https://developer.apple.com/documentation/systemconfiguration) [Network Reachability APIs](https://developer.apple.com/documentation/systemconfiguration/scnetworkreachability?language=swift). Because these APIs were originally written in C, they are quite old and cumbersome to use from Swift. In 2018, Apple added the [Network](https://developer.apple.com/documentation/network) framework which introduced the [`NWPathMonitor`](https://developer.apple.com/documentation/network/nwpathmonitor) class. This API addressed some of the problems with [`SCNetworkReachability`](https://developer.apple.com/documentation/systemconfiguration/scnetworkreachability?language=swift), 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.\n\nNetworkReachability supports synchronous reachability queries, as well as constant asynchronous reachability observation via the following mechanisms:\n\n* [Delegation](https://developer.apple.com/library/archive/documentation/General/Conceptual/DevPedia-CocoaCore/Delegation.html)\n* [Closures](https://docs.swift.org/swift-book/LanguageGuide/Closures.html)\n* [NotificationCenter](https://developer.apple.com/documentation/foundation/notificationcenter)\n* [Swift Concurrency](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html)\n* [Combine](https://developer.apple.com/documentation/combine)\n\nNetworkReachability supports [RxSwift](https://github.com/ReactiveX/RxSwift) bindings with an optional additional package: [NetworkReachabilityRxSwift](https://github.com/vsanthanam/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.**\n\n## Installation\n\nNetworkReachability is currently distributed exclusively through the [Swift Package Manager](https://www.swift.org/package-manager/). \n\nTo 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:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/vsanthanam/NetworkReachability.git\", from: \"1.0.0\")\n]\n```\n\nTo add NetworkReachability as a dependency to an Xcode Project: \n\n- Choose `File` → `Add Packages...`\n- Enter package URL `https://github.com/vsanthanam/NetworkReachability.git` and select your release of choice.\n\nOther distribution mechanisms like CocoaPods or Carthage may be added in the future.\n\n## Usage \u0026 Documentation\n\nNetworkReachability's documentation is built with [DocC](https://developer.apple.com/documentation/docc) and included in the repository as a DocC archive. The latest version is hosted on [GitHub Pages](https://pages.github.com) and is available [here](https://reachability.tools/docs/documentation/networkreachability).\n\n[![Documentation](Images/Documentation.svg)](https://reachability.tools/docs/documentation/networkreachability)\n\nAdditional installation instructions are available on the [Swift Package Index](https://swiftpackageindex.com/vsanthanam/NetworkReachability)\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fvsanthanam%2FNetworkReachability%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/vsanthanam/NetworkReachability)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fvsanthanam%2FNetworkReachability%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/vsanthanam/NetworkReachability)\n\n## License\n\n**NetworkReachability** is available under the MIT license. See the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsanthanam%2Fnetworkreachability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsanthanam%2Fnetworkreachability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsanthanam%2Fnetworkreachability/lists"}