Detect SIM change OR find IMSI of the SIM using official iOS SDK?
Asked Answered
C

2

12

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. But I guess Apple doesn't allow that.

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.

Is there any way for me to detect SIM change using the official iOS SDK?

Caviness answered 3/8, 2012 at 4:39 Comment(4)
If no SIM is inserted, CTCarrier.isoCountryCode returns nil. developer.apple.com/library/ios/ipad/#DOCUMENTATION/…Gasteropod
but i want to detect a SIM change...Caviness
possible duplicate of Is it possible to determine if the SIM/Phone number has changed?Concision
Take into account that it is possible to change the phone number without changing SIM card.Salic
E
3

should sign up for a notification using subscriberCellularProviderDidUpdateNotifier in http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Reference/CTTelephonyNetworkInfo/Reference/Reference.html

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.

Enrichetta answered 3/8, 2012 at 5:37 Comment(1)
is this worked at your end? how you did it can you help me i tried below code but not working info.subscriberCellularProviderDidUpdateNotifier = { inCTCarrier in DispatchQueue.main.async(execute: { print("sim changed") }) }Heder
P
6

You can get access only on jailbroken device.

Find file on path /private/var/root/Library/Lockdown/data_ark.plist

the key is InternationalMobileSubscriberIdenti

Polymerous answered 30/8, 2012 at 11:38 Comment(0)
E
3

should sign up for a notification using subscriberCellularProviderDidUpdateNotifier in http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Reference/CTTelephonyNetworkInfo/Reference/Reference.html

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.

Enrichetta answered 3/8, 2012 at 5:37 Comment(1)
is this worked at your end? how you did it can you help me i tried below code but not working info.subscriberCellularProviderDidUpdateNotifier = { inCTCarrier in DispatchQueue.main.async(execute: { print("sim changed") }) }Heder

© 2022 - 2024 — McMap. All rights reserved.