{"id":16948641,"url":"https://github.com/timoliver/toreachability","last_synced_at":"2025-10-11T03:45:31.317Z","repository":{"id":48762076,"uuid":"172200720","full_name":"TimOliver/TOReachability","owner":"TimOliver","description":"A lightweight, unit-tested class that detects network status changes on iOS.","archived":false,"fork":false,"pushed_at":"2024-01-27T05:32:46.000Z","size":668,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T22:13:56.204Z","etag":null,"topics":["cocoapods","internet","ios","macos","network","objective-c","reachability"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/TimOliver.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":"timoliver","custom":"https://tim.dev/paypal"}},"created_at":"2019-02-23T10:22:56.000Z","updated_at":"2024-07-28T05:17:20.000Z","dependencies_parsed_at":"2024-01-25T02:27:16.402Z","dependency_job_id":"e13fb4e9-827c-46ed-a7b0-957badc7a990","html_url":"https://github.com/TimOliver/TOReachability","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOReachability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOReachability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOReachability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOReachability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimOliver","download_url":"https://codeload.github.com/TimOliver/TOReachability/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245140815,"owners_count":20567452,"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":["cocoapods","internet","ios","macos","network","objective-c","reachability"],"created_at":"2024-10-13T21:51:45.830Z","updated_at":"2025-10-11T03:45:31.223Z","avatar_url":"https://github.com/TimOliver.png","language":"Objective-C","funding_links":["https://github.com/sponsors/timoliver","https://tim.dev/paypal","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=M4RKULAVKV7K8"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/TimOliver/TOReachability/raw/main/screenshot.png\" align=\"right\" width=\"420\" /\u003e\n\n# TOReachability\n\t\n[![CI](https://github.com/TimOliver/TOReachability/workflows/CI/badge.svg)](https://github.com/TimOliver/TOReachability/actions?query=workflow%3ACI)\n[![Version](https://img.shields.io/badge/version-1.2.0-blueviolet?style=flat)](http://cocoadocs.org/docsets/TOReachability)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/TimOliver/TOReachability/master/LICENSE)\n[![PayPal](https://img.shields.io/badge/paypal-donate-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=M4RKULAVKV7K8)\n\n*A lightweight, unit-tested class that detects network status changes on iOS.*\n\n`TOReachability` is a small Objective-C class that can be used to detect when the current device changes its network status; between Wi-Fi, cellular, or none.\n\nIt based on, but is a completely new implementation of Apple's [Reachability](https://github.com/robovm/apple-ios-samples/tree/master/Reachability) class. Compared to Reachability, apart from being properly name-spaced for Objective-C, it has been cleaned up to use modern Objective-C conventions, removes since deprecated features, and removes much of the unnecessary code Apple included.\n\nWhile `TOReachability` only currently includes the most basic of functionality, it is definitely open to PRs when and if anyone has additional functionality they would like.\n\n## Features\n* Fully-unit tested.\n* Integrated with CocoaPods and Carthage.\n* Reactively executes callback logic whenever the network status of the current status changes.\n* Callback choices include blocks, delegates and `NSNotification`.\n* For cases where only Wi-Fi is needed, an option may be set to ignore cellular status changes.\n* Fully-bridged and tested to work in Swift.\n\n## Minimum Requirements\n* iOS 11.0 \n* tvOS 11.0 \n* macOS 10.13\n* Xcode 14.0\n\n## Installation Instructions\n\n\u003cdetails\u003e\n\t\u003csummary\u003e\u003cstrong\u003eCocoaPods\u003c/strong\u003e\u003c/summary\u003e\n\t\u003cbr\u003e\n\t\u003cpre\u003epod 'TOReachability'\u003c/pre\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e\u003cstrong\u003eCarthage\u003c/strong\u003e\u003c/summary\u003e\n\t\u003cbr\u003e\n\t\u003cpre\u003egithub \"TimOliver/TOReachability\"\u003c/pre\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e\u003cstrong\u003eManual Installation\u003c/strong\u003e\u003c/summary\u003e\n\t\u003cbr\u003e\n\tSimply move the `TOReachability` folder to your Xcode project and import it.\n\u003c/details\u003e\n\n## Sample Code\n\n### Objective-C\n\n```objc\nTOReachability *reachability = [[TOReachability alloc] init];\n\nreachability.statusChangedHandler = ^(TOReachability *reachability,\n\t\t\t\t\tTOReachabilityStatus newStatus,\n\t\t\t\t\tTOReachabilityStatus oldStatus) {\n        NSLog(@\"Network Status Changed!\");\n};\n\n[reachability start];\n```\n\n### Swift\n\n```swift\nlet reachability = Reachability()\n\nreachability.statusChangedHandler = { reachability, newStatus, oldStatus in\n    print(\"Network Status Changed!\")\n}\n\nreachability.start()\n```\n\n## Credits\n\nDeveloped by [Tim Oliver](http://twitter.com/TimOliverAU) as a component for [iComics](http://icomics.co).\n\nDevice mockup by [Mockups Design](https://mockups-design.com/).\n\n## License\n\n`TOReachability` is licensed under the MIT License, please see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoliver%2Ftoreachability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoliver%2Ftoreachability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoliver%2Ftoreachability/lists"}