Q:

iPhone, NSData, wifi vs. cellular network

I'm working on an application that downloads some data from the internet using NSData's initWithContentsOfURL method. At startup I'm using some code from Apple's Reachability sample to check if a wifi connection is available; if not, then the app just shows an error message and refuses to really start (as requested by my client). All is working fine on iPod and iPad, but on iPhone, my client reports much, much slower download speeds, unless he turns on airplane mode, in which case download speeds are on par with iPod / iPad speeds. So it seems that even though a wifi connection is available, the iPhone is probably using the cellular network to download the data. Which is really weird. Does anyone have any idea about what I might be doing wrong? 

A:

I believe your answer is SCNetworkReachability which you already have access to since you are using Apple's Reachability code.

The SCNetworkReachability API allows an application to determine the status of a system's current network configuration and the reachability of a target host. One of the flags returned by the API, kSCNetworkReachabilityFlagsIsWWAN, will tell you if a network connection to the target host uses the carrier network. The Reachability sample code shows how to determine the active network connection.

You could also use this to enforce WiFi if that's what you want.
Have a look at UIRequiresPersistentWiFi

