For iOS 16, CTCarrier looks to have been deprecated.
https://developer.apple.com/documentation/coretelephony/ctcarrier
What will be the correct way, going forward, to receive information regarding carrier information such as MCC, MNC, and ISO country codes?
At my company, we use this information as data points to assist in scammer detection and a few other small but relatively important things, such as: limiting Phone Number logins from countries / carriers we do not support for pricing reasons.
I cant find any WWDC videos on the reason behind this deprecation or what any new classes may be that will support this information.
They will deprecate that in a later iOS version. In iOS 16.4 they return a static string for CTCarrier.isoCountryCode. We detected that via bug reports in our apps :-(
We will replace this with the following information from Locale.current.regionCode due to our assumption that users usually keep the device region of their home country and so have the same ISO country code of the SIM card. I know that is not always correct but it is the closest that we can get now. We then use the regionCode (e.g. en_US) to get the phone numbers ISO country code (e.g. +1) from a big enum which maps all countries to their phone number country code.
You can lookup relevant code here. The big JSON of countries which we use can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With