Feedback FB7556677
This is my code:
private lazy var pmC = NWPathMonitor(requiredInterfaceType: .cellular)
private lazy var pmW = NWPathMonitor(requiredInterfaceType: .wifi)
pmC.pathUpdateHandler = { (path: NWPath) in
print("C PATH STATUS:", path.status)
path.availableInterfaces.forEach( { interfce in
DispatchQueue.main.async {
print(" C INTERFACE:", interfce, "Status:", path.status)
}
} )
}
pmC.start(queue: assetQueue)
pmW.pathUpdateHandler = { (path: NWPath) in
print("W PATH STATUS:", path.status)
path.availableInterfaces.forEach( { interfce in
DispatchQueue.main.async {
print(" W INTERFACE:", interfce, "Status:", path.status)
}
} )
}
pmW.start(queue: assetQueue)
Do a test. Lauch with both cellular and wifi on. Works as expected. Turn WIFI off, works again. Turn WIFI back on - nothing. So as far as I know, I've only got an "expensive network" available, even though WIFI is on and I can use it in Safari.
Console Log:
// WIFI and CELLULAR ON, launch
C PATH STATUS: satisfied
W PATH STATUS: satisfied
C INTERFACE: pdp_ip0 Status: satisfied
W INTERFACE: en0 Status: satisfied
// Turn Cell off
C PATH STATUS: unsatisfied
// Turn WIFI off
W PATH STATUS: unsatisfied
// Turn Cell on
C PATH STATUS: satisfied
C INTERFACE: pdp_ip0 Status: satisfied
C PATH STATUS: satisfied
C INTERFACE: pdp_ip0 Status: satisfied
C PATH STATUS: satisfied
C INTERFACE: pdp_ip0 Status: satisfied
// WIFI on
... nothing
Even switched to Safari, opened a web page, then switched back. Nothing after many minutes.
Note: iOS 13.3 iPhone 6s+ I tried and tried to get a sysdiagnose - volume buttons and power button for 1+ seconds, nothing happens.