4

I want to implement a functionality of sending Email/SMS to a particular email address or number on the basis of data connection availability. Three scenarios-

1) If data connection is a Wi-fi or 3G and above then send an email.

2) If data connection is 2G or lesser send a SMS.

3) If no data connection then do nothing.

So, how will I be able to get the connection type of an iPhone/iPad? I have searched on google and stackoverflow but didn't get the right answer. And will the solution be able to pass Apple's Review Cycle?

Thank you Akshay

Akshay
  • 2,973
  • 6
  • 43
  • 75
  • 1
    might help.. http://stackoverflow.com/questions/5589324/how-to-detect-wheter-running-on-3g-or-wi-fi-on-iphone – janusfidel Aug 30 '12 at 09:51

1 Answers1

4

Yes this is possible to a certain extend, you will need to use Apples Reachability code.

But you can only detect if you are on WiFi, WAN of not connection at all. Where WAN is either 3G or 2G.

rckoenes
  • 69,092
  • 8
  • 134
  • 166