Search code examples
iphonewifinsurlconnectioncarrier

How to download data from Carrier data/3GS not wifi?


In my iphone app, the user can set whether he wants to download data from internet via wifi or 3G/Carrier data.

How can we do that programatically?

In other words, how can I force iphone to get data from carrier data not from wifi?

Any suggestion guys?


Solution

  • You can't force the iPhone to use carrier data (3G / Edge) instead of WiFi if the phone is connected to WiFi. You can use the SCNetworkReachabilityGetFlags function to determine if you're on WiFi or have a carrier data connection.

    What you could do is, if the user is connected to WiFi, pop up a message saying that your app only works with carrier data and ask the user to switch off WiFi and restart the app. I would not recommend this though as it will just irritate the hell out of your users, although this didn't stop Vodafone Portugal from doing it for a number of their apps in a silly attempt to force you to use more (expensive) carrier data.