views:

1207

answers:

3

Hi,

In the context of an Objective-C, iPhone application, I need to be able to tell whether the iPhone is connected to a wifi network, and if possible listen to changes in this state.

Does anyone know how to do this?

thanks, gabouy

+3  A: 

Look at the Reachability sample provided by Apple in the developer site. It does this.

marcc
+8  A: 

Check out the Reachability sample.

Dave
+1  A: 

I'd recommend using the Reachability sample project that Apple provides. It covers the base testing you need to do to check for connectivity.

There is also a good example in the iPhone Developer Cookbook.

paulthenerd