Hello.
Updated to xCode 7 and swift 2 and now cannot implement the Reachability functionality in my application. Using the following code to check the status of connection:
func statusChangedWithReachability(currentReachabilityStatus: Reachability)
{
var networkStatus : NetworkStatus = currentReachabilityStatus.currentReachabilityStatus()
var statusString : String = ""
print("Network Status value: \(networkStatus.value)")
if networkStatus.value == NotReachable.value {
print("Network Not Reachable...")
reachabilityStatus = kNOTREACHABLE
}
else if networkStatus.value == ReachableViaWiFi.value {
print("Reachable via WIFI...")
reachabilityStatus = kREACHABLEWITHWIFI
}
else if networkStatus.value == ReachableViaWWAN.value {
print("Reachable via WWAN...")
reachabilityStatus = kREACHABLEWITHWWAN
}
}Against each networkStatus.value have an error: "Value of type 'NetworkStatus' has no member 'value'." How should I implement this function in Swift 2?
Thanks a lot!