简体   繁体   English

如何知道iPhone用户SIM卡是否已更改?

[英]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. 我正在开发一个应用程序,需要知道用户自上次启动以来是否更换了他的SIM卡。 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. 我在文档中找不到任何内容,除了通知subscriberCellularProviderDidUpdateNotifier ,它警告我SIM卡已经改变,但如果用户在手机关闭时这样做,我的应用程序将不会意识到这一点。 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. 该应用程序WhatsApp Messenger似乎能够做我喜欢的事情。

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]; 所有信息,你可以得到的是[CTTelephonyNetworkInfo subscriberCellularProvider]; .

This is a CTCarrier object. 这是CTCarrier对象。 This contains a mobileNetworkCode and a carrierName. 它包含mobileNetworkCode和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. 但是你只能识别运营商的变化..所以如果一张verizon卡与另一张verizon卡交换,你猜不到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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