Possible Duplicate:
Programmatically get own phone number in iPhone OS
I am developing an iOS 4.1 application that need to get the phone number of the user. I have tried the blow code to get the phone number. But it is not working.
NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"];
is there any way to get the phone number in iOS 4.1 ?
Thanks, Shinto
In short there is no approved way to do this.
This is a duplicate question see Programmatically get own phone number in iOS for more info.
精彩评论