How to identify when a SIM is changed in iPhone

I have a financial app which should work only when a the registered phone number is there in device, so after login to app and if the user removes the SIM, the app should indicate that the app will conitnue to work only if that particular registered phone number(SIM) is there.

There is no API to discover the user’s phone number. That would be a massive privacy fail.

(There used to be a non-deprecated way to get notified when the SIM is changed, but it still didn’t tell you the actual number. And it’s deprecated now anyway.)

If @eskimo's suggestion in your other thread doesn’t satisfy your requirements, then I’d suggest you re-examine the requirements. Why are you trying to make the security of the app depend on hardware rather than than just user credentials? What is the threat you are trying to address?

Just sayin’... I have lots of financial apps on my own phone from well-known institutions (banks, brokerages, etc.) and they all use the normal security features: username/password, Face ID, 2FA, etc. I’m curious why your app has requirements that go beyond this.

There is an API to obtain the phone number(s) in the phone and whether a number is active or not. However it's a carrier api, this means Apple allows apps to use it provided they are developed by a carrier. Presumably you are not a carrier, therefore there is no way you can determine the phone number nor when a sim is changed.

How to identify when a SIM is changed in iPhone
 
 
Q