if let networkError = error { if (networkError.code == -1009) { return false //Offline } } return true //Online