what is key in CTTelephonyNetworkInfo().serviceSubscriberCellularProviders and CTTelephonyNetworkInfo().serviceCurrentRadioAccessTechnology

Jafar Khoshtabiat

I'm playing around with CoreTelephony framework to get some information about cellular data provider out of it. I execute below code:

let obj = CTTelephonyNetworkInfo()
if let array = obj.serviceSubscriberCellularProviders {
    for (key, value) in array {
        print("{")
        print("\(key)=<\(value.carrierName)>")
        print("\(key)=<\(value.mobileCountryCode)>")
        print("\(key)=<\(value.mobileNetworkCode)>")
        print("}")
    }
}

if let array = obj.serviceCurrentRadioAccessTechnology {
    for (key, value) in array1 {
        print("{")
        print("\(key)=<\(value)>")
        print("}")
    }
}

I get this out put:

{
    0000000100000001=<Optional("Carrier")>
    0000000100000001=<Optional("432")>
    0000000100000001=<Optional("11")>
}
{
    0000000100000001=<CTRadioAccessTechnologyLTE>
}

Question I'm wondering what is "0000000100000001" and what information we can get from it?

ernesto

The official docs are pretty clear now:

Although the actual value of a key isn’t important, you can also use it to get the carrier information associated with the service. To do so, pass the key to the serviceSubscriberCellularProviders dictionary.

So you can pass the "0000000100000001" as key to serviceSubscriberCellularProviders.

I think the API was changed to accommodate for iPhones with multiple SIMs.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related