简体   繁体   English

检测SIM更改或使用官方iOS SDK查找SIM的IMSI?

[英]Detect SIM change OR find IMSI of the SIM using official iOS SDK?

I am developing an app for a mobile carrier. 我正在开发一个移动运营商的应用程序。 First I wanted to find any of the things (IMSI, ICCID, IMEI, MSISDN) so that I can detect if the SIM is related to my mobile carrier. 首先,我想找到任何东西(IMSI,ICCID,IMEI,MSISDN),以便我可以检测SIM是否与我的移动运营商相关。 But I guess Apple doesn't allow that. 但我猜Apple不允许这样做。

Now as a workaround I will ask the user to register his phone number with my app. 现在作为一种解决方法,我会要求用户在我的应用程序中注册他的电话号码。 But then again bad things will happen if user changes the SIM. 但是如果用户更换SIM卡,那么将会再次发生不好的事情。

Is there any way for me to detect SIM change using the official iOS SDK? 有没有办法让我使用官方iOS SDK检测SIM卡更改?

You can get access only on jailbroken device. 您只能在越狱设备上访问。

Find file on path /private/var/root/Library/Lockdown/data_ark.plist 在路径/private/var/root/Library/Lockdown/data_ark.plist上查找文件

the key is InternationalMobileSubscriberIdenti 关键是InternationalMobileSubscriberIdenti

should sign up for a notification using subscriberCellularProviderDidUpdateNotifier in http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Reference/CTTelephonyNetworkInfo/Reference/Reference.html 应使用http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Reference/CTTelephonyNetworkInfo/Reference/Reference.html中的 subscriberCellularProviderDidUpdateNotifier注册通知

but, you're only be notified if the swap occurs while your app is running. 但是,只有在您的应用运行时发生交换时才会收到通知。 you're still be unable to detect if the user changes the SIM to another SIM from the same operator when your app is not running. 当您的应用未运行时,您仍然无法检测用户是否将SIM卡从同一运营商更改为另一个SIM卡。

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

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