This question already has answers here:
Programmatically get own phone number in iOS
(9 answers)
Closed 5 years ago.
I have been looking a bit around for a way to retrieve the phone number of an iOS device but without too much sucess as I've seen mixed reports
According to this link it's a no :
Programmatically get own phone number in iOS
Also here https://www.npmjs.com/package/cordova-plugin-sim
I don't see any information about the phoneNumber for iOS.
However, as these links aren't brand new, I would like know if things have changed since
You can't. You should ask user for phone number from UI.
First of All, its impossible to get Phone number in iOS programatically. iOS don't allow such things. You can get the carrier name of the mobile number.
If you really want to get the Mobile Number, then you have to ask the user to send a message on a number which will be configured with your backend service. Once the message reaches to the number in Your backend System , you can get the mobile number from the backend with a Service call.
NO, this not possible as Apple wants to respect the privacy of their users. You can't access the phone number from public API, so you cannot.
Related
This question already has answers here:
Could an iOS application read/access SMS text?
(2 answers)
Closed 5 years ago.
One way to log in in our app is to fill a phone number, which sends a SMS with a key to this phone number.
I want to know if there is a way to check if the current user's phone number is the same than the one typed, and if so automatically fill the field so the user doesn't have to fill it himself, and even worse leave the app to fetch it in Messages if needed.
Thanks for your help.
There is no way to accomplish this , server sends verification to the number that the user had typed with AccoountKit or any other service , get sms and type it , as there is no permission in IOS to make the app intercept user messages
I need to get the IMEI number and serial number of the SIM card in iOS, i have done this in android using the telephonymanager, but how can i achieve this on iOS?
I need this value because I save it in a data base using a web service, each time a client attemp to log in, so it doesnt matter if the client changes celphone or not, the account will be the same because the SIM card will be the same one.
I have been searching on the web, and found a way with this:
NetworkController.m
But it seems like this class has been removed from the web. Another possible way to achieve my goal is to use:
UIDevice-IOKitExtensions.m
But no documentation is given. Any ideas?
Does apple accepts an app using private framework?
Apple does not allow the use of private framework / api. Also, getting the users IMEI number will cause Apple to reject the app.
This question already has answers here:
Programmatically get own phone number in iOS
(9 answers)
Closed 9 years ago.
I am building an IOS6 app which requires the user's phone number,
Is there a way to ask the user for permission and get the number in programmatic way?
Or he has to manually type it in?
I am using Xcode 4.5 if it matters..
You can't get the phone via any easy API within iOS. There might be a way to do it via the technique described in this related question, but this is a few years old and Apple may have closed this hole (which uses an undocumented key). I also wonder if Apple wouldn't allow the app on the App Store for privacy reasons. Probably not.
You'll have to trust the user to type in the correct phone number if you prompt him/her to.
I know this was not possible before, but I was wondering if there was any way possible to programmatically retrieve the device's phone number in the new update. I know that they added a lot of new features regarding your contacts information, but I want to know my own phone number in my app.
If you are refering to the "Mango" update then no. This information is not available.
There are no public details about what will be available in future updates.
Previous answers to the question of how to get the phone number involved using NSUserDefaults and SBFormattedPhoneNumber, but apparently this doesn't work anymore since iOS 4.
So I'm looking for alternative solutions, I've seen mention of using IOKit but can't find any details.
Does anybody know a reliable way to get the phone number (and by reliable I don't mean the hack to try and search the contacts for the owner's contact info).
P.S.
I am already aware that the app will be rejected by Apple: but this is not for an App Store app.
There is not a way to do this. You can see from these questions:
Is it possible to get iphone's phone number programmatically in 2011?
Programmatically get own Phone Number in iPhone OS 4.0
Programmatically get own phone number in iOS
You can however get a contact's phone number. You can figure out how to do this from here.