Skip to content

Commit

Permalink
fix(ios, 5g): do not use 5g symbols until iOS14.1 (#525)
Browse files Browse the repository at this point in the history
* fix(ios, 5g): do not use 5g symbols until iOS14.1

* refactor(ios, 5g): remove unnecessary else branch

verified with previous code that the conditional logic terminated with the previous else prior,
this one was added by the Xcode available guard refactor but is not needed
  • Loading branch information
mikehardy committed Nov 17, 2021
1 parent 42ab162 commit 932cd83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ios/RNCConnectionState.m
Expand Up @@ -62,9 +62,11 @@ - (instancetype)initWithReachabilityFlags:(SCNetworkReachabilityFlags)flags
_cellularGeneration = RNCCellularGeneration3g;
} else if ([netinfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyLTE]) {
_cellularGeneration = RNCCellularGeneration4g;
} else if ([netinfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyNRNSA] ||
[netinfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyNR]) {
_cellularGeneration = RNCCellularGeneration5g;
} else if (@available(iOS 14.1, *)) {
if ([netinfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyNRNSA] ||
[netinfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyNR]) {
_cellularGeneration = RNCCellularGeneration5g;
}
}
}
}
Expand Down

0 comments on commit 932cd83

Please sign in to comment.