How to know 5G network type from code in iOS?

let networkInfo = CTTelephonyNetworkInfo()
    let carrierType = networkInfo.serviceCurrentRadioAccessTechnology
    guard let carrierTypeName = carrierType?.first?.value else {
        return "UNKNOWN"
    }

    switch carrierTypeName {
    case CTRadioAccessTechnologyGPRS, CTRadioAccessTechnologyEdge, CTRadioAccessTechnologyCDMA1x:
        return "2G"
    case CTRadioAccessTechnologyLTE:
        return "4G"
    default:
        return "3G"
    }
There are new constants for NRNSA and NR.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
How to know 5G network type from code in iOS?
 
 
Q