Objective C Get iPhone number
How to get the iphone number from sim using xcode or objective c?
NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@”SBFormattedPhoneNumber”];
NSLog(@”Phone Number: %@”, num);
NSLog(@”Phone Number: %@”, num);
Thanks for the tip! But I found it only works when user type there number in iTunes.
here is the details: http://www.alexcurylo.com/blog/2008/11/15/snippet-phone-number/
NOTE:
On the iPhone simulator you should receive a “null” value as a result for this call. The same result is obtaining if you run this code on an iPod Touch.
——–
Thanks for the comment!