Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3751224
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:02:39+00:00 2026-05-19T09:02:39+00:00

I am having trouble getting phone numbers from the iPhone Addressbook. There is no

  • 0

I am having trouble getting phone numbers from the iPhone Addressbook.

There is no problem when the number do not contain a country code prefix like +45, but if it does, my app crashes…

Is this a known issue? I haven’t been able to find anything about it…

Thanks

EDIT:

I get phonenumber like this:

    -(void)getContact 
    {

        ABPeoplePickerNavigationController *pp = [[ABPeoplePickerNavigationController alloc] init];
        pp.displayedProperties = [NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonPhoneProperty]];
        pp.peoplePickerDelegate = self;
        [self presentModalViewController:pp animated:YES];
        [pp release];


    }

    - (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
        // assigning control back to the main controller
        [self dismissModalViewControllerAnimated:YES];
    }

    - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {
        return YES;
    }

-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier {

            ABMultiValueRef phoneProperty = ABRecordCopyValue(person,property);
            saveString = (NSString *)ABMultiValueCopyValueAtIndex(phoneProperty,identifier);
            saveString = [saveString stringByReplacingOccurrencesOfString:@" " withString:@""];
            nummerTextField.text = saveString;
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:02:39+00:00Added an answer on May 19, 2026 at 9:02 am

    How are you retrieving your Address book object, and once it is retrieved how do you process it to fetch the number from it.I am using the below shown code to do the same what you have mentioned and it fetches the numbers accurately.

    ABRecordRef person = ABAddressBookGetPersonWithRecordID(appDelegate.addressBook, contactId);
    
    ABMultiValueRef multiValue = ABRecordCopyValue(person, kABPersonPhoneProperty);
    
    NSArray *allNumbers = (NSArray *)ABMultiValueCopyArrayOfAllValues(multiValue);
    NSMutableDictionary *filteredNumbers = [NSMutableDictionary new];
    
    if([allNumbers count] > 0) {
        for(int contactIndex = 0; contactIndex < [allNumbers count]; contactIndex++) {
            NSString *contactValue = (NSString *)ABMultiValueCopyLabelAtIndex(multiValue, contactIndex);
            if(!([contactValue isEqualToString:@"_$!<WorkFAX>!$_"] || [contactValue isEqualToString:@"_$!<HomeFAX>!$_"] || [contactValue isEqualToString:@"_$!<Pager>!$_"])) {
    
                if([[contactValue substringWithRange:contactLabelCharacterCustom] isEqualToString:@"_$"])
                    typeOfContact = [contactValue substringWithRange:contactLabelCharacter];
                else
                    typeOfContact = [contactValue substringWithRange:(NSRange){0,1}];
                NSString *value = (NSString *)ABMultiValueCopyValueAtIndex(multiValue, contactIndex);
                [filteredNumbers setValue:typeOfContact forKey:value];
                [value release];
                value = nil;
            }
            [contactValue release];
            contactValue = nil;
        }
    }
    

    Im sure it will help you.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having trouble getting the javascript alert to display from my code behind. c# -
I'm having trouble getting phong shading to look right. I'm pretty sure there's something
im having trouble getting a string (containing a URL) from one activity to another.
I'm currently having trouble getting example code for using tweepy to access Twitter's Streaming
I'm having some trouble getting debug mode to work on my android phone. I
I am having trouble with the query in this code. The problem is one
Having trouble getting the following code to work. Calling swapLevel() directly works fine, but
I'm having trouble getting this code to set the prompt: // Create a PeoplePicker
I've been having trouble querying a web server for information from my Windows Phone
Having trouble getting the oauth access token and secret exchanged from the request tokens

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.