Hello,
We recently moved to the NWPath.Status implementation for reachability, is that the same reachability that powers URLSessionConfiguration.waitsForConnectivity? Or does the NWPath implementation rely on a specific network path such as cell only or wifi only?
Is using NWPath still the best way to measure if the network is reachable?
Thank you!
One great resource to check out on this topic is the video "Adapt to Changing Network Conditions".
In short, you should avoid pre-flight / reachability checks whenever possible. URLSession's waitsForConnectivity and the waiting state in Network.framework are both based on NWPath, so anything that the path can check will already be reflected by those APIs. Actually attempting a connection makes sure there is a network path for the endpoints you're trying to reach, not just generically; and connections additionally handle more complex cases like triggering VPNs, applying proxies, and more.