1

I wish to check:

A - Whether there's an internet connection. B - If there is, whether it's over wifi or not.

How can I do this?

Andrew
  • 15,489
  • 25
  • 116
  • 200
  • 1
    http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html – WhoaItsAFactorial Aug 15 '12 at 19:42
  • possible duplicate of [How to check for an active Internet Connection on iPhone SDK?](http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk)You need to look for the answer before post, this question has been asked many times before. – Mick MacCallum Aug 15 '12 at 19:50

1 Answers1

6

Look at this example from apple Reachability.

You can then copt Reachability.h and Reachability.m to your project and use it inside your project.

You can use Reachability version from Tony Million that fits for ARC and GDC projects.

shannoga
  • 19,000
  • 20
  • 99
  • 163