Its not possible for an iOS app to programatically obtain the phone number.
But if you plug an iPhone into the iExplorer app it displays the number. How does it obtain it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Technically, it’s possible both for iOS applications and for desktop (Windows and OS X) applications to retrieve the phone number (and other device-specific information, such as the IMEI, the serial number, etc.) from a particluar device by communicating to the lockdown daemon in iOS. The lockdown daemon (
lockdownd) is a daemon process that runs on the device and provides access to these informations via Apple’s proprietary API and protocol.How all this works? For a desktop application, the developer has to link against the MobileDevice library (it’s present by default on OS X and installed along with iTunes on Windows as far as I know) and use the functions in the reverse engineered header file (here) to obtain such data. For your information, on Linux, the same can be achieved by using libimobiledevice.
For an iOS app, the developer of the app has to link against
/usr/lib/liblockdownd.dyliband import the corresponding (reverse engineered) header file,liblockdown.dylib, to use its functions.