-2

Hi I am testing my application for various types of internet connections with my device. I want my application send an internet request only if WI-FI is available and not in other cases like GPS ,WAP, 3G, etc....

Please also provide some information about how to check the current speed of that particular connection.

Thanks in advance

benRollag
  • 1,219
  • 4
  • 16
  • 21
Ranjeet Sajwan
  • 1,925
  • 2
  • 28
  • 60
  • Maybe you should visit one of the rooms at [chat.stackoverflow.com](http://chat.stackoverflow.com/). It is usually fast and loose in chat. You can ask as many off-topic questions you like. I often jump into a room while zero'ing in on a problem. – jww Sep 25 '18 at 08:51

1 Answers1

2

Use Apple's Reachability class to check for Wifi or WAN. Use this example and code: http://developer.apple.com/library/ios/#samplecode/Reachability/index.html

Checking the speed is more difficult, you would need to measure it by your own I think, maybe the best way is to ping and measure the response latency.

mgratzer
  • 620
  • 1
  • 5
  • 8