Popularity
5.9
Stable
Activity
0.0
Stable
459
26
119
Programming language: Swift
License: MIT License
Tags:
Networking
Reach alternatives and similar libraries
Based on the "Networking" category.
Alternatively, view Reach alternatives based on common mentions on social networks and blogs.
-
RealReachability
We need to observe the REAL reachability of network. That's what RealReachability do. -
Networking
DISCONTINUED. Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support -
XMNetworking
A lightweight but powerful network library with simplified and expressive syntax based on AFNetworking. -
Digger
Digger is a lightweight download framework that requires only one line of code to complete the file download task -
SOAPEngine
This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app. -
TWRDownloadManager
A modern download manager based on NSURLSession to deal with asynchronous downloading, management and persistence of multiple files. -
ws โ๏ธ
โ ๏ธ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing) -
MultiPeer
๐ฑ๐ฒ A wrapper for the MultipeerConnectivity framework for automatic offline data transmission between devices -
AFNetworking+RetryPolicy
Nice category that adds the ability to set the retry interval, retry count and progressiveness.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Reach or a related project?
README
Reach
A simple class to check for internet connection availability in Swift. Works for both 3G and WiFi connections.
Install
Manually
- Add the Reach.swift file to your project.
Usage
There are two ways to get network status information from Reach.
- Call
Reach().connectionStatus()
. The network status is returned in an enum calledReachabilityStatus
.
let status = Reach().connectionStatus()
switch status {
case .unknown, .offline:
print("Not connected")
case .online(.wwan):
print("Connected via WWAN")
case .online(.wiFi):
print("Connected via WiFi")
}
- By subscribing to
ReachabilityStatusChangedNotification
s. The network status is returned as a string.
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(ViewController.networkStatusChanged(_:)), name: Notification.Name(rawValue: ReachabilityStatusChangedNotification), object: nil)
Reach().monitorReachabilityChanges()
}
@objc func networkStatusChanged(_ notification: Notification) {
if let userInfo = notification.userInfo {
let status = userInfo["Status"] as! String
print(status)
}
}
ToDo
- [ ] Return storngly typed object containing more information about the network status.
Credits
- Chris Danielson is the author of the original code written in Objective-C.
- Martin R from StackOverflow helped me immensely in converting C code to Swift.