A SIM card contains ICCID (International Circuit Card ID). The ICCID is unique in the world. I need my app get the ICCID of the SIM card that is in the iPhone. Does anyone know whether it is possible, and if possible, how to do?
i am using below code.
let networkInfo = CTTelephonyNetworkInfo()
if let carrier = networkInfo.serviceSubscriberCellularProviders?.values.first {
print("Carrier Name: (carrier.carrierName ?? "Unknown")")
print("Mobile Country Code: (carrier.mobileCountryCode ?? "Unknown")")
print("Mobile Network Code: (carrier.mobileNetworkCode ?? "Unknown")")
print("ISO Country Code: (carrier.isoCountryCode ?? "Unknown")")
print("Allows VOIP: (carrier.allowsVOIP)")
} else {
print("No carrier information available")
}
and receiving default values
Carrier Name: --
Mobile Country Code: 65535
Mobile Network Code: 65535
ISO Country Code: --
Allows VOIP: true