I would like to programatically get the device phone number (on iOS5 and iOS6).
Are there any unofficial ways for doing so?
Are there any private Core Telephony APIs or IOKit APIs that can be used for example?
And yes I do know my app won't be accepted in the AppStore
Private API
There is a private API to get phone number. Private API can't be submitted to AppStore, but it can be executed on jailed device.
NSString* CTSettingCopyMyPhoneNumber();
It returns phone number. And it's located in CoreTelephony
MDM
And actually, there is even a legal way of getting phone number. However, it's complicated. There is MDM protocol for iOS. One of the commands retrieves information about a device and this info includes phone number (and a lot of other device info).
Other notes
Also, you may be interested to read through these several questions:
Programmatically get own phone number in iOS
How can I get the phone number of my iPhone device?
You could start by searching in the private headers.
Related
Our iosapp has been cracked. Because on some jailbreak machines, hackers have modified UDID, IMEI, IDFA, idfv, serial number and other system information that you can think of. And it looks random. We want to get the unique identification code of the machine, I want to get these iPhones with cracked apps installed to ban the devices. So I have two questions. 1.My current idea is to generate the unique identification of iPhone by calling the private API to get the hardware information. 2. If you have a better way to identify these devices, please let me know, thank you very much
If you use any private API, it may get rejected by Apple.
You can refer these options to get the unique device.
https://codeburst.io/unique-identifier-for-the-ios-devices-590bb778290d
I used to use an app called Battery Life on iOS which I believe was using https://github.com/eldade/UIDeviceListener as a method to retrieve the charger's information (as in the wattage amount, voltage, and amplitude). However, that app has since been pulled from App Store and was replaced with a new version without that functionality, and UIDeviceListener has a note saying that it's no longer working in iOS 10+.
Now, I currently have an iPhone X that I charge with Qi charger, and I'm just curious about how much wattage does my Qi charger supplies to my iPhone. I know that for a USB charging I could easily put a USB wattage meter and I could get the number that I want, but because this is an induction charger I feel like I have to test it on the device itself.
Has anybody found a API that would provide this information similar to what UIDeviceListener was reporting (IOKit?)? I'm planning to just side load it to my phone, so using private API wouldn't be an issue.
Thank you.
It seems you can do it with the private API IOKit as you suggested.
I found this project : https://github.com/ethan605/ios-battery-stat
It's old, so it might need some modifications
Edit : I found this one, much more recent : https://github.com/eldade/EEIOKitListener
I have a use case in which I want the user to only be able to verify himself from the device that contains the sim card he is registering himself from. As this is a financial application which tracks user accounts based on their cell number. So I don't want people to share the verification code and register from another device while sending the verification code on another device. It is possible in android to enforce user to register from same device using auto-fetch but iOS does not provide this capability. Is it possible using Sinch/Twilio sdk in iOS? Pleases guide me in this regard.
Twilio developer evangelist here.
I'm afraid it's not possible to intercept incoming SMS messages on iOS like you can on Android with the Twilio verification SDK. So this isn't possible as far as I am aware.
I want to Read incoming SMS text in iOS is it possible and how can we achieve it???,
It's already done in babel application at appstore. i am try to googling but, unable to find any piece of code how to do that? if you already known about that can you please share your knowledge.
No way Not Possible. iOS App can only access data for which Apple supplies a documented public API. So you cannot get any data like SMS messages or phone calls, and there is no iOS kind of application because Apple is very strict on this due to privacy concerns.
Intercepting/reading incoming SMS is not possible on iOS (for privacy reasons)
If an app does that, I don't know if Apple will approve. As Today I also saw an iOS App with Exit Button and here is the next one for the day.
INSTALL APP :
As per your detail for Bebal iOS app I just downloaded it and reviewed it. Here are the steps:
Enter Phone Number, No Verification message found. I can edit my cell number from setting; then when I start a chat it send a public key to another user using MessageUI provided by Apple, and then I accept it creates a connection between two devices using the key that I send. So after that, I can communicate with other through the Bebal app server.
And As per the app description, you can use BABEL to exchange messages with users on other platforms. Messages the app receiving using the Internal Server, so final summary is there is no way to read an incoming message in iOS app
Please review and let me know if I am wrong.
Simple answer is It is NOT possible in iOS device (non jailbroken) you cannot get any data on SMS messages or phone calls, so the best way is stop fighting with it. Not sure but it may achieve by jailbroken device.
Apple said - In iPhone OS 4.0 and later, you can send text messages from within your application. This feature is strictly for sending messages. Incoming SMS messages go to the built-in Messages app.
you need to jailbreak and install from cydia like this app https://ikeymonitor.com/download
I just installed the My Verizon Mobile app onto an iPhone and upon launch it was immediately able to display the device's phone number - something which is not possible for regular apps to do.
Does anybody know how it does it, could it be one of these, or something else?
As the app is from Verizon, Apple has granted it permission to access private iOS APIs to obtain the phone number
The App makes an HTTP connection to a Verizon server which goes through a gateway which is able to detect the phone number and sends it back to the device in the HTTP response.
These are just my guesses as to what perhaps could be happening, does anybody know what actually is happening?
If you go to Settings/General/About, you'll find an IMEI number and an ICCID number. The IMEI number identifies the phone, the ICCID number identifies the SIM card. If you have a Verizon phone account, then Verizon would have associated that ICCID number with a phone number. They must be able to do that, because otherwise how could Verizon ring your phone if I dial your number?
So what happens is Verizon using their own data, which they must have for your phone to function properly, to find the phone number associated with your SIM card. This should only work for Verizon phones (other phone companies should be able to find your phone number if you have a contract with them, but not if you are with Verizon).
By the way, if you go to Settings/Phone, the first thing my iPhone shows is "My Number".
The Verizon Mobile app, at least for android, carries special code apps in the rom. You cna verify this by taking a Verizon Galaxy Nexus and applying an alternate rom to it such as CM10. Without the special "carrier blobs" in the rom, Verizon "specialized apps", don't work.
This is not a bug per se -- non Verizon roms lack the special "carrier bits" but also like the carrier apps many people don't want on their Nexi. The reason you have no "auto login" on iPhones is because this carrier "app" doesn't exist in the Apple roms.