简体   繁体   中英

How to know if iPhone user SIM Card has changed?

I am developing an app which needs to know if the user has changed his sim card since the last launch. I could't find anything in the documentation except for the notification subscriberCellularProviderDidUpdateNotifier which warns me that the sim card has changed, but if the user do this when the cellphone is turned off for example, my aplication will not be aware of this. Is it possible to do this or is there any workaround for this situation? The app WhatsApp Messenger appears to be able to do something like what i need.

I've seen other questions about this issue but still haven't found any satisfing answer.

Best regards!

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

This is a CTCarrier object. This contains a mobileNetworkCode and a carrierName. But you can only recognize carrier changes.. so if a verizon card is exchanged with another verizon card, you cannot recognize it, I guess.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM