2011年12月13日 星期二

How to get phone number from iPhone?

///to get know the device is iPhone or iPod touch ...
NSString deviceType = [[UIDevice currentDevice] model] ;
/// if the device is iPhone, pick up the phone number
if ( [deviceType isEqualToString:@"iPhone"] ) {
NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"];
NSLog(@"phone number:%@",num) ;
}

沒有留言:

張貼留言