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 6999317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:31:32+00:00 2026-05-27T20:31:32+00:00

ABRecordSetValue(person, kABPersonPhoneProperty, (__bridge CFTypeRef)phoneNum, nil); ABRecordSetValue(person, kABPersonEmailProperty, (__bridge CFTypeRef)eMailId, nil); Commenting these two lines

  • 0
ABRecordSetValue(person, kABPersonPhoneProperty, (__bridge CFTypeRef)phoneNum, nil);
ABRecordSetValue(person, kABPersonEmailProperty, (__bridge CFTypeRef)eMailId, nil);

Commenting these two lines gives proper output (Saving the entry to AdressBook, without email and phone entry).
But, while in execution it fails and crashes the program.

Value for the Vars are:

phoneNum : 000-000-0000

eMailId : AbcdefghIjklm@qwertyuiopasdfghjk.com

Error type: EXC_BAD_ACCESS

Any Idea?
Or need any more info??

  • 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-27T20:31:33+00:00Added an answer on May 27, 2026 at 8:31 pm

    It would be good to see where and of what type you define the vars. You may have also released the address book before those lines. (e.g. CFRelease(multiPhone);)
    And as far as I know, phoneNum and emailID should be ABMutableMultiValueRef. At least that was how I did it:

    Adding a single phone number

    ABMutableMultiValueRef multiPhone = ABMultiValueCreateMutable(kABMultiStringPropertyType);
    
    ABMultiValueAddValueAndLabel(multiPhone, [self.contact telephone], kABPersonPhoneMobileLabel, NULL);            
    ABRecordSetValue(person, kABPersonPhoneProperty, multiPhone,nil);
    

    Adding e-mail:

        ABMutableMultiValueRef multiEmail = ABMultiValueCreateMutable(kABMultiStringPropertyType);
        ABMultiValueAddValueAndLabel(multiEmail, @"abc@abc.com", kABWorkLabel, NULL);
        ABRecordSetValue(person, kABPersonEmailProperty, multiEmail, &error);
        CFRelease(multiEmail);
    

    More info on Address Book tutorial

    Hope this helps.

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

Sidebar

Related Questions

I'm trying to set the kABPersonType value for a contact (ABAddressBook iOS). ABRecordSetValue(person, kABPersonType,
I'm trying to add a 'Home' and 'Work' address my Person record. It seems
I am a newbie and I have a question with ABRecordSetValue in Xcode 4.2.
My purpose is to process one image from image library, and save this image
I am trying to replicate the behavior that the iphone that happens when you
I know how to add a label&value into a local contact,just like this: CFErrorRef
In my application,i need to create groups of contacts for sending group sms.First the
Setup: I'm looking for insight into using a ABPersonViewContoller without getting data from the
I am working in an iPhone application which uses adding contact to the address
I created a view controller which creates new records for the first visit with

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.