How to get the iphone number from sim using xcode or objective c?
NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"]; NSLog(@"Phone Number: %@", num);</div>
That’s all!
Tags: apple, iphone, number, xcode
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!
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!