0

Is there any way to know if the user has changed his SIM card with a different SIM card?

really what I want to do is to know from which number he is using right now, I mean if so far he used some phone number and now he changed his phone number to a different number, can I detect it?

Thanks in advance.

Parth Bhatt
  • 19,235
  • 28
  • 132
  • 216
ytpm
  • 4,614
  • 6
  • 50
  • 104

2 Answers2

8

You 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.

And if you want to get access only on jailbroken device ?

Then you should find file on path /private/var/root/Library/Lockdown/data_ark.plist

the key is InternationalMobileSubscriberIdenti

Vineet Singh
  • 4,793
  • 1
  • 29
  • 39
  • I want to know only if the app is open and the user changes the SIM card and also when I open the app if the last SIM card that the app recognise is different from current one, this will work? – ytpm Oct 15 '13 at 12:24
0

You can not read sim number with public api. You can only detect if the sim card is changed, take a look to Core Telephony Framework Reference.

When you detect a sim card change you can ask nicely the user to enter his phone number and validate it via an sms system.

Alex Terente
  • 11,929
  • 5
  • 50
  • 70