how to retrieve the user phone number programmatically?

NSString *phoneNumber = [[NSUserDefaults standardUserDefaults] objectForKey:@”SBFormattedPhoneNumber”];

NSLog(@”Your phone number is %@”, phoneNumber);

Check these two links:
        http://www.alexcurylo.com/blog/2008/11/15/snippet-phone-number/
        http://stackoverflow.com/questions/193182/programmatically-get-own-phone-number-in-iphone-os

Blogged with the Flock Browser
Advertisements