Search code examples
macoscocoasystem-configuration

How to check if the user has internet?


I'm making an app for OSX and i would like to know how can i check if the user has internet connection?
I've been searching around on the internet for this, but what i've tried is not working.
Any example code would be very nice! Thanks


Solution

  • Here you can find a drop-in, ARC compatible version of Reachability.

    Another version is available here.