Hi, well this is quite a complicated topic for a few reasons.
The behavior looks like you have Cellular data, and when you switch back to WiFi there is a small window when the internet does not work because it is switching connections...
As for checking if there is connection before doing something, the problem is that there might be but then disappear once you start the main work. I think there is even mention in the official Apple guidelines to not check for connection before doing other network related tasks. I think better idea is to just try it and report to user possible problems.
Imagine you implement checking network connection against some popular DNS, but maybe DNS will go down and user cannot continue, even though they have connection and your API is also working fine.
URLSession
also has settings where it waits for connectivity for specified amount of time and does not fail straight away.
If you really want some checking, I would keep using the NWPathMonitor
and when it indicates that connection is not available, then maybe show warning banner in your UI. Something like: "Looks like there might be a connection issue". But dont disable the button