3

I have an app that reports real time stream flow data via web service calls. Each stream's data is obtained through a separate web service call. This app is intended for use in rural areas where fast connections aren't always possible. Users can store favorites and we would like the favorites to have up to date data, however, in rural areas with poor internet connectivity this could be time consuming.

So, my question: is there anything within the iOS sdk that allows one to determine if a connection is 3G, Edge, etc.?

Thanks! V

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Pheepster
  • 6,045
  • 6
  • 41
  • 75

1 Answers1

3

The answer in the comment above basically recommends testing for the type of connection but if you just want to find out if the user is on wifi versus a cell network you should checkout the Reachability sample here: https://developer.apple.com/library/ios/samplecode/Reachability/Introduction/Intro.html

That being said, if network latency could be an issue I highly recommend checking out the MKNetworkKit: http://blog.mugunthkumar.com/products/ios-framework-introducing-mknetworkkit/

I've used this in the past to take an educated guess at how many network operations I can have open at once.

Then there is also this take on it, checking for network latency, found here: How can I better optimize networking on iOS?

Community
  • 1
  • 1
IanStallings
  • 806
  • 10
  • 21