Adding notification for CT radio information

This commit is contained in:
edparsons 2015-12-28 10:18:01 +00:00
parent 791d828fd4
commit 3bf19c4c02

View File

@ -58,6 +58,7 @@
if (isConnectionRequired) {
return @"none";
} else {
if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending) {
CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new];
if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyGPRS]) {
return @"2g";
@ -82,6 +83,7 @@
} else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyLTE]) {
return @"4g";
}
}
return @"cellular";
}
}