File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
GoogleDataTransport/GDTCORLibrary Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,18 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
71
71
};
72
72
networkInfo = [[CTTelephonyNetworkInfo alloc ] init ];
73
73
});
74
- NSString *networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology ;
74
+ NSString *networkCurrentRadioAccessTechnology;
75
+ if (@available (iOS 12 , *)) {
76
+ NSDictionary <NSString *, NSString *> *networkCurrentRadioAccessTechnologyDict =
77
+ networkInfo.serviceCurrentRadioAccessTechnology ;
78
+ if (networkCurrentRadioAccessTechnologyDict.count ) {
79
+ // In iOS 12, multiple radio technologies can be captured. We prefer not particular radio
80
+ // tech to another, so we'll just return the first value in the dictionary.
81
+ networkCurrentRadioAccessTechnology = networkCurrentRadioAccessTechnologyDict.allValues [0 ];
82
+ }
83
+ } else {
84
+ networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology ;
85
+ }
75
86
if (networkCurrentRadioAccessTechnology) {
76
87
NSNumber *networkMobileSubtype =
77
88
CTRadioAccessTechnologyToNetworkSubTypeMessage[networkCurrentRadioAccessTechnology];
You can’t perform that action at this time.
0 commit comments