views:

596

answers:

4

how to get the phone number in iPhone using iPhone programming...

i mean code

A: 

To be honest, I don't have a clue, but from a security standpoint I would think that this isn't possible. Too much risk for virus writers to compromise your phone number and telephone. Just imagine spammers collecting phone numbers!

maybe someone else can elaborate, or verify if it is possible/not possible to do what you ask :)

Makach
This would only be an issue if you could do it from a web page being viewed. You'd have to install a malicious app for this to really be an issue and that's part of the reason for apps needing to be checked by Apple before their available via the app store.
Matt Lacey
+1  A: 

Have a look at this SO question programmatically-get-own-phone-number-in-iphone-os

epatel
Just be aware that the method described there is highly unreliable. If the user ported their number from a different carrier it will return incorrect results. And there really is no better way.Also be aware that Apple would probably reject your app from the store for using this.
Tom Harrington
A: 

HERE IS THE ANSWER

http://blog.timeister.com/2009/06/25/objective-c-get-iphone-number/


Adrian

A: 

The answer is NO, you can't... SDK does not help you. However, through CoreTelephony framework (4.x+) you can get info such as network code, network name, etc.

Fabio Ricci