CTTelephonyNetworkInfo().serviceSubscriberCellularProviders 和 CTTelephonyNetworkInfo().serviceCurrentRadioAccessTechnology 中的关键是什么
what is key in CTTelephonyNetworkInfo().serviceSubscriberCellularProviders and CTTelephonyNetworkInfo().serviceCurrentRadioAccessTechnology
我正在研究 CoreTelephony 框架,以从中获取有关蜂窝数据提供商的一些信息。我执行以下代码:
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("}")
}
}
我明白了:
{
0000000100000001=<Optional("Carrier")>
0000000100000001=<Optional("432")>
0000000100000001=<Optional("11")>
}
{
0000000100000001=<CTRadioAccessTechnologyLTE>
}
问题
我想知道“0000000100000001”是什么,我们可以从中得到什么信息?
现在official docs已经很清楚了:
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.
因此您可以将“0000000100000001”作为键传递给 serviceSubscriberCellularProviders
。
我认为 API 已更改以适应 iPhones with multiple SIMs。
我正在研究 CoreTelephony 框架,以从中获取有关蜂窝数据提供商的一些信息。我执行以下代码:
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("}")
}
}
我明白了:
{
0000000100000001=<Optional("Carrier")>
0000000100000001=<Optional("432")>
0000000100000001=<Optional("11")>
}
{
0000000100000001=<CTRadioAccessTechnologyLTE>
}
问题 我想知道“0000000100000001”是什么,我们可以从中得到什么信息?
现在official docs已经很清楚了:
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.
因此您可以将“0000000100000001”作为键传递给 serviceSubscriberCellularProviders
。
我认为 API 已更改以适应 iPhones with multiple SIMs。