I am rewriting my existing Objective-C code (iOS) to Swift and now am facing some issues with the Reachability class of Apple for checking network availability.
Try below code
let connected: Bool = Reachability.reachabilityForInternetConnection().isReachable()
if connected == true {
println("Internet connection OK")
}
else
{
println("Internet connection FAILED")
var alert = UIAlertView(title: "No Internet Connection", message: "Make sure your device is connected to the internet.", delegate: nil, cancelButtonTitle: "OK")
alert.show()
}