tags:

views:

250

answers:

2

as title how to? i have tried the code from others sources:

id number = [[NSUserDefaults standardUserDefaults] objectForKey:@”SBFormattedPhoneNumber”];

NSLog(@”user phone number is %@”, number);

however it return NULL even thought i tested on device with firmware 2.2.1 any idea?

A: 

I don't believe it is possible with the 2.2.1 SDK.

Wil Shipley worked very hard on this and talked about it at his presentation to a bay area cocoa heads group back in april. Google wil shipley cocoa heads vimeo if you want to watch it.

I haven't tried myself.

Carl Coryell-Martin
A: 

I had the same issue and resolved it by setting the number on the phone. By default I do not think that the number is set on the iPhone but that can resolved by going into Settings->Phone->My Number.

jin Khera