How to obtain the phone number of the iOS phone programmatically?

Getting a phone number of the iOS device is programmatically is not feasible. Apple doesn’t encourage it. You can get the phone number using private API’s but that will result in rejection of your application from the Apple App Store.

As per the apple development guideline apps should be self-contained in their bundles, and may not read or write data outside the designated container area and device number is not available within your application’s container.

As per Apple developer forum −

Regardless of which programming language you use, Apple doesn't make the phone number associated with a device available to developers.

Updated on: 30-Aug-2019

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started