I have the following code:
let networkStatus = CTTelephonyNetworkInfo()
func getCellularInfo() {
if #available(iOS 12.0, *) {
var info = networkStatus.serviceSubscriberCellularProviders
if let aKey = networkStatus.value(forKey: "serviceSubscriberCellularProvider") {
print("aKey: \(aKey)")
}
}
}
This code retuns:
aKey: { 0000000100000001 = "CTCarrier (0x28282e610) {\n\tCarrier name: [Vodacom]\n\tMobile Country Code: [655]\n\tMobile Network Code:[01]\n\tISO Country Code:[za]\n\tAllows VOIP? [YES]\n}\n"; }
I am not familiar with this method, how do I obtain the values associated with the keys, for example \n\tMobile Country Code: [655]/n/