How to identify when SIM changed in iPhone?

会有一股神秘感。 提交于 2019-12-04 22:16:57

问题


How to find if a user changes his SIM card from his phone(iPhone). we can find "mobileCountryCode,isoCountryCode,mobileCountryCode and mobileNetworkCode" through programatically these are not specific to particular SIM, these are specific to operator, is there any way to identify when user changes his SIM card from his iPhone.

Please any one help me on this.

Thanks in advance.


回答1:


You are able to sign up for a notification using subscriberCellularProviderDidUpdateNotifier in CTTelephonyNetworkInfo

However you will only be notified if the swap occurs while your app is running. You will still be unable to detect if the user changes the SIM to another SIM from the same operator when your app is not running.




回答2:


Hi tony You can use this for finding sim has been changed or not.

NSString *currentIMSINo = CTSIMSupportCopyMobileSubscriberIdentity(NULL);


来源:https://stackoverflow.com/questions/5245846/how-to-identify-when-sim-changed-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!