5

Is it possible to determine which kind of network is on the device when the user is interacting with my app?

Right now I have the Reachability class and I can differentiate between Wi-Fi and Cellular, but how to check if the Cellular is LTE, 3G, HSPA, EDGE?

Devfly
  • 2,495
  • 5
  • 38
  • 56
  • I won't recommend doing that. Just because you have a low LTE connection it does not guarantee that is faster then a 3G connection. – miho Sep 14 '12 at 19:13
  • I don't care how fast the LTE network is. In the end it's faster than HSPA and EDGE, right? – Devfly Sep 14 '12 at 19:56
  • No, LTE has the capacities to be able to be faster then other technologies. For example when using 3G in the mountains of Austria you will get lower download rates then when using EDGE. That's because the 3G signal is very bad but it still there so the iPhone will try to use it. The same occurs to the still unfinished LTE network. In short: LTE can be slower then 3G, 3G can be slower then EDGE and so on. In most cases the real download rate will be much more informative then the cellular network type. – miho Sep 14 '12 at 20:17
  • So what will you advice me? To not differentiate any cellular networks, just differentiate cellular and wi-fi? – Devfly Sep 14 '12 at 20:37
  • Depends on for what you would need to differ. You can measure the download rates or just differentiate cellular and wi-fi. – miho Sep 14 '12 at 20:53
  • For most use cases, it's enough to tell WiFi and Cellular apart. By the Way, that's what apple suggests anyways. Because sometimes Edge can be faster then 3G and 3G faster then LTE. Cellular data can be quite hard to get your head around. – Tobi Nary Oct 12 '12 at 10:44
  • Check out this Stack Overflow Post . –  Nov 11 '12 at 21:42

2 Answers2

0

There is currently no way to differentiate between different types of cellular network.

See this question for some further information.

Community
  • 1
  • 1
FractalDoctor
  • 2,496
  • 23
  • 32
0

As of iOS7, information about the cellular connection is available using CTTelephonyNetworkInfo():

let info = CTTelephonyNetworkInfo()
print(“carrierName": " + "\(info.subscriberCellularProvider?.carrierName ?? "Has not been configured for carrier")")
print(“currentRadioAccessTechnology: " + "\(info.currentRadioAccessTechnology ?? "Airplane Mode/No cell connection")")

currentRadioAccessTechnology will show a string that describes the type of connection.

Paul King
  • 1,881
  • 20
  • 23