Detecting Internet on macOS

I would think that after 40yrs the author of the app knows its audience very well.

A successful DNS lookup call could also mean that the remote host is simply in the DNS cache, with no current Internet connection.

Given the various security measures that may be in place on a local network, It seems to me that rather than trying to determine whether there is general Internet access, the application should be trying to determine whether it can contact whatever remote host that it needs to contact. For example, if it needs to contact some specific server, then it should attempt to do just that. That should be all that matters. If you want to find out if you can call home, doesn’t it make more sense to try to call home rather than trying to call Google or Apple?

Robert got the point! Thank you.

We all as software developer should stick to the principle “security and privacy by default and design”. This simple issue “how to detect internet” is a wonderful example how we mislead and betray our customers, causing more problems in corporate and managed networks (as mentioned before) and basically harming ourselves.

This leads us to the next question: Why trying to detect an internet connection? Update service? Sending Telemetry? Another intrusive, fancy service?

for me the main purpose is ti detect if there is an update to our software.
(beside the apps that do connect to internet to work)

Most of my customers are designers and electricians, so it’s whatever their home computer setup is.

And actually, most of the theaters are the same - only companies like Cirque du Soleil are really locked down, and in the case of Cirque they wish it wasn’t, because they often have trouble with things as simple as receiving their email.