How do I know if my iPhone’s SIM card has changed?

I am developing an application that should know if the user has changed his SIM card since the last launch. I could not find anything in the documentation, except for the notification subscriberCellularProviderDidUpdateNotifier , which warns me that the SIM card has changed, but if the user does this when the cell phone is turned off, for example, my application will not know about it. Is it possible to do this or is there any workaround for this situation? The WhatsApp Messenger app seems to be able to do something like what I need.

I have seen other questions on this issue, but still have not found a satisfactory answer.

Yours faithfully!

+3
source share
1 answer

All the information you can get is to read [CTTelephonyNetworkInfo subscriberCellularProvider];.

This is a CTCarrier object. It contains mobileNetworkCode and carrierName. But you can only recognize media changes. So if a Verizon card is exchanged with another Verizon card, you cannot recognize it, I think.

+1
source

All Articles