Hello,
The following code works fine on Wifi but throws PingError.hostNotFound exception on 4G.
That makes no sense though, because the same host IP works on Wifi, but not on 4G.
do {
let ping = try SwiftyPing(host: serverIP, configuration: PingConfiguration(interval: 0.5, with: 1), queue: DispatchQueue.global())
ping.finished = { (result) in
completed(true, result.roundtrip?.average ?? 0.0)
}
ping.targetCount = count
try ping.startPinging()
} catch let error {
print("Error: \(error.localizedDescription)")
completed(false, 0.0)
}
Hello,
The following code works fine on Wifi but throws
PingError.hostNotFoundexception on 4G.That makes no sense though, because the same host IP works on Wifi, but not on 4G.