Getting a user’s phone number on the iPhone

There’s a few questions about whether this should be allowed, or not. I’m of the mindset that, providing it is detailed in the license agreement for the software, it’s ok. Yes yes, no one reads them – but is that the vendor’s problem?

Anyway, taken from Ars Technica is this little gem:

CFShow([[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]);

You can also browse quite a bit more of this dict.:

NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences/.GlobalPreferences.plist"];
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
CFShow(dict);

Enjoy… But use responsibly.

Subscribe

Subscribe to our e-mail newsletter to receive updates.

No comments yet.

Leave a Reply