Can I detect LTE connection using iOS SDK?

I use the accessibility API to detect my current connection, but I can only distinguish between WIFI and 3G.

I get the following flags:

LTE: kSCNetworkReachabilityFlagsIsLocalAddress|kSCNetworkReachabilityFlagsIsWWAN|kSCNetworkReachabilityFlagsTransientConnection|kSCNetworkReachabilityFlagsReachable

WIFI: kSCNetworkReachabilityFlagsIsDirect|kSCNetworkReachabilityFlagsReachable

The problem is that LTE returns the same flags as the 3G connection. Is there a way to determine if the user currently has LTE or 3G?

+7
source share
2 answers

As in iOS 7, you can find this using the currentRadioAccessTechnology CTTelephonyNetworkInfo property in the CoreTelephony structure.

 #import <CoreTelephony/CTTelephonyNetworkInfo.h> CTTelephonyNetworkInfo *networkInfo = [CTTelephonyNetworkInfo new]; if ([networkInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyLTE]) { // ... } 
+15
source

I wonder if this hidden Core Telephony API can provide you with enough information for you to determine if you are connected to LTE or slower technology.

 CTRegistrationGetCurrentMaxAllowedDataRate(); 

Maybe you should experiment.

Read more about using private APIs here: iPhone mobile phone number using primary telephony

However, I read that your application will be rejected by Apple if you use private APIs.

+3
source

All Articles