I am getting a phone number from the address book and I put it in an NSString* :
ABMultiValueRef phoneProperty = ABRecordCopyValue(person,property);
NSString *phone = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(phoneProperty,identifier);
I want to get only the numbers as a straight string (meaning without characters like (,),+,- and so on).
when I execute the code above and check it NSLog(@"phone is %@", phone);
I get: phone is 1 (800) 800-8000
Actually In the Xcode console I see that before the '(' and after the ')' there is a centre dot sign which was not copied properly to this post.
My goal is to turn 1 (800) 800-8000
to this 18008008000
. How can I do it?