SIM verification on iPhone

Hi,

We have a need to provide SIM verification. At present, accessing the phone number bound to the device is not programmatically accessible. Would Apple consider exposing this API via a user consent?

Otherwise, what is the suggested approach to verify the SIM card is the correct phone number on an iOS device?

Answered by DTS Engineer in 830930022
Would Apple consider exposing this API via a user consent?

We can’t answer questions like that on the forums. My general advice is that, if you want to see Apple change something, you should file an enhancement request describing your requirements.

Please post your bug number, just for the record.

Otherwise, what is the suggested approach to verify the SIM card is the correct phone number on an iOS device?

There’s one specific affordance for this sort of thing in iOS: If you’re goal is to support UPI, you can use the -setUPIVerificationCodeSendCompletion: mechanism.

Beyond that, the standard option is to ask the user for their phone number, send a code to that phone number, and have them enter it. This doesn’t guarantee that the iPhone is using that number, but it’s a clear indication that the iPhone’s user has access to that number.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Would Apple consider exposing this API via a user consent?

We can’t answer questions like that on the forums. My general advice is that, if you want to see Apple change something, you should file an enhancement request describing your requirements.

Please post your bug number, just for the record.

Otherwise, what is the suggested approach to verify the SIM card is the correct phone number on an iOS device?

There’s one specific affordance for this sort of thing in iOS: If you’re goal is to support UPI, you can use the -setUPIVerificationCodeSendCompletion: mechanism.

Beyond that, the standard option is to ask the user for their phone number, send a code to that phone number, and have them enter it. This doesn’t guarantee that the iPhone is using that number, but it’s a clear indication that the iPhone’s user has access to that number.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

can setUPIVerificationCodeSendCompletion be made available for non upi apps?

can setUPIVerificationCodeSendCompletion be made available for non upi apps?

It’s hard to answer questions like that because the answer depends on what you mean by “can”:

  • Can you do this? — No. Access to this is gated by an entitlement that’s only available to UPI apps.
  • Could Apple change the system to allow this? — Probably. The current technical and business restrictions are rooted in Apple business policy, and AFAIK there’s nothing preventing us from changing that policy.
  • Will Apple does so? — I can’t offer an opinion on that. Such policy decisions are way above my pay grade.

If you’d like to see this policy change, you are free to file an enhancement request for that. However, you need to be realistic about your expectations here. This API literally has UPI in the same, so it’d be weird if it were made available to no UPI apps.


Regarding the second question about iOS 18 behaviour, I’ll respond to that in the thread you created for it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

SIM verification on iPhone
 
 
Q