0

How to get mobile number from iPhone programmatically?

I tried the code below but it's not working.

NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"];

Please suggest me a right way.

Thanks.

Costique
  • 23,712
  • 4
  • 76
  • 79
Kemo
  • 488
  • 6
  • 12
  • 1
    [duplicate of this oft asked question](http://stackoverflow.com/questions/193182/programmatically-get-own-phone-number-in-iphone-os) and/or [this one](http://stackoverflow.com/questions/3108487/sbformattedphonenumber-issue-in-ios4-0) – Michael Dautermann Feb 24 '12 at 06:28

1 Answers1

0

You can't get the mobile number programmatically from iPhone, atleast not if jailbroken.

Please see this thread for more info.

Community
  • 1
  • 1
Ilanchezhian
  • 17,426
  • 1
  • 53
  • 55