Reachability.swift
Reachability.swift copied to clipboard
Simpler Usage didn't work on Wifi or Cellular with no internet access
I use this simpler usage for my whole project reachability.But,I do have some problem which is its output "connected" when i connect to cellular data or wifi which got no internet access.
Any help to make it improve?
let reachability = try? Reachability.reachabilityForInternetConnection()
if reachability == nil || reachability!.currentReachabilityStatus == .NotReachable {
print("not connected")
} else {
print("connected")
}
I think this question should be answered....Any Help please?This is not simple general question. It was more than it.
same problem here. I setup reachability with my own server but it says connected when the device is inside a portal network without internet access self.reachability = try! Reachability(hostname: URLs.sharedInstance.hostName)
Me too! Should have solution for connected wifi without internet connection.