tags:

views:

736

answers:

1

Hi All,

Last week we submitted our app to apple. Yesterday we got response from them. Basically our app plays the videos from IIS. Now we are not at all checking the network type. it is playing videos without wi-fi also. But apple is asking us to restrict it to play only with wi-fi. So now i need to check my network connection type.

can some on post the code or any existing libraries to do this functionality.

Thanks a lot..

+1  A: 

You can use:

SCNetworkReachabilityFlags flags;
SCNetworkReachabilityGetFlags (target,&flags)
);

to get the network status:

if (flag & kSCNetworkReachabilityFlagsIsWWAN)
  // 3G/Edge/GPRS
else
  // Wifi
Diederik Hoogenboom
ihave used reachability class provided by apple to findout the network type. here is the link for it.http://iphone.svn.wordpress.org/trunk/Classes/Reachability.m
nbojja