I am looking for a SDK API to retrieve the device's local phone number
from the SIM card. Is there a way to do it?
1:UIScrollView image/photo viewer with paging enabled and zooming
There's no reliable way. Creating the Iphone MapKit showUserLocation Ring Annimation You'll find code online this tells you to look up SBFormattedPhoneNumber, and any times this works, although not consistently. Upload and download data from server with Cocoa Touch? Mostly it's people who brought their phone number over from ananother cell carrier. How do I lock the orientation to portrait mode in a iPhone Web Application? In those cases, you receive a phone number, although not one for the current phone, and not one that's guaranteed to be valid for anything at all (it may not even be unique).. How do I make a button play sounds in a certain order using an array? I have no basis for saying whether this is a few people or a lot, although it's an undocumented key that's inherently unreliable.. How to assign copy of object back to original reference?NSScanner Looping retrieving multiple values
This method refers to the number stored in iTunes at time of activation... so, don't use it. From 4.x you must take advantage from CoreTelephony framejob to receive many information around the network, although still no number... .
CFShow([[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]); NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences/.GlobalPreferences.plist"]; NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; CFShow(dict);
Take a look at this blog post here..
NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@”SBFormattedPhoneNumber”]; NSLog(@”Phone Number: %@”, num);