0

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

Peter Hosey
  • 93,914
  • 14
  • 203
  • 366
Pedro Vieira
  • 3,222
  • 3
  • 34
  • 71
  • http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk – Eugene May 06 '12 at 19:06
  • i'm using ARC, from what i've seen Reachability doesn't work with ARC – Pedro Vieira May 06 '12 at 19:09
  • @PedroVieira: You can use MRC classes alongside ARC classes in the same program; you just can't mix MRC and ARC code within a single class or module. – Peter Hosey May 06 '12 at 19:20

1 Answers1

2

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

Another version is available here.

sergio
  • 67,961
  • 11
  • 98
  • 119