0

Possible Duplicate:
Programmatically get own phone number in iPhone OS

I want to get my own cell number in the app. Is there anyway to get it programmatically without taking input from user.

Community
  • 1
  • 1
Najeebullah Shah
  • 4,164
  • 4
  • 35
  • 49
  • 4
    Short answer: no. Even if you find a way, the app will be rejected by Apple. – Macmade Dec 07 '11 at 20:42
  • 1
    I think this is what you are looking for -> http://stackoverflow.com/questions/193182/programmatically-get-own-phone-number-in-iphone-os – Jason Whitehorn Dec 07 '11 at 20:43
  • Long(er) answer: You can go through the user's address book, but it will be hard to know which entry would be their own (if they even have themselves in their address book). – Richard J. Ross III Dec 07 '11 at 20:44
  • 4
    Be sure to read the comment for the answer with 30+ votes from @JasonWhitehorn link. – Joe Dec 07 '11 at 20:44
  • @Joe indeed. The link I provided should be taken with a grain of salt, as it's a very poor idea to try and do this... as the 30+ vote comment indicates. – Jason Whitehorn Dec 07 '11 at 20:46

1 Answers1

4

Luckily, there's no official way and your app will get rejected if you use one of the unofficial ways. Even if you think you have valid use case, it's a big privacy issue and the risk of abuse is too high so there is no official way to get the number. If your app or service needs this number to provide all the features you want to offer you need to ask the user to enter it into a textfield (and thus giving him a chance to deny you this information).

DarkDust
  • 90,870
  • 19
  • 190
  • 224