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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:02:15+00:00 2026-06-15T22:02:15+00:00

I am using an ABNewPersonViewController to create a person. Everything works fine so far.

  • 0

I am using an ABNewPersonViewController to create a person. Everything works fine so far. I do set multivalue properties as well as single values. After tapping “Add” the contact can be found in the adressbook.

But there is a problem when editing this contact. After adding the contact to the adressbook, I save the addressbookID, so that I am able to identfiy if the contact is still saved in the AB.

So If the user wants to export a contact again, I do not create a new ABPersonRecordRef, but using the existing one identified by the id I have saved before:

    ABRecordID recordId = [aContact.addressBookRecordId intValue];

    ABRecordRef personRecord = nil;
    if(recordId != 0) {
        personRecord = ABAddressBookGetPersonWithRecordID(addressBook, recordId);
        if(personRecord) {
            return personRecord;
        } else {
            personRecord = ABPersonCreate();
        }
    } else {
        personRecord = ABPersonCreate();
    }
    //set properties etc.

The problem now is, that this just works the first time. If the user displays the person a second time in the ABNewPersonViewController and taps on Cancel, the record will be deleted in the adress book. Although it was previously saved fine.

I tried using an ABUnknownPersonViewController, but the problem is that it seems that the attributes det on the recordRef are not displayed exactly like in the ABNewPersonViewController.

Any suggestions?

  • 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-06-15T22:02:16+00:00Added an answer on June 15, 2026 at 10:02 pm

    This will be of use to you:

    Can ABNewPersonViewController be used to edit existing records?

    It covers a tutorial with your exact problem.

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

Sidebar

Related Questions

Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using JDeveloper , I started developing a set of web pages for a project
Using Jenkins or Hudson I would like to create a pipeline of builds with
Using PyGtk's IconView, I can set the icons to be reorderable by calling gtk.IconView.set_reorderable(True)
Using Java,I have to fetch multiple sets of values from an XML file to
using chrome and ff so far have made a nasty glitch when using scrollTo
Using the opencart image manager how would I set the upload to automatically remove:
I'm trying to create a new record of Person thru my App. I have
I want to programmatically add contact to iphone contact list without using ABNewPersonViewController. I
Using CSS, how can I create a partial border as per image below I

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.