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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:05:01+00:00 2026-06-12T09:05:01+00:00

Since updating to iOS 6 I’ve noticed that my code to add a contact

  • 0

Since updating to iOS 6 I’ve noticed that my code to add a contact to iPhone’s address book no longer works. I believe this is a permission related problem, since Apple now requires user permission before accessing contacts (fixing this issue).

I expected the app to automatically ask permission to access contacts, like in the screenshot below, but it doesn’t. Trying to add the contact just fails with ABAddressBookErrorDomain error 1.

Do I need to programmatically launch the access to contacts request dialog? How is that done?

access contacts

  • 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-12T09:05:02+00:00Added an answer on June 12, 2026 at 9:05 am

    As per this documentation on apple’s site (scroll down to Privacy in the middle of the page), access to the address book must be granted before it can be access programmatically. Here is what I ended up doing.

      #import <AddressBookUI/AddressBookUI.h>
    
      // Request authorization to Address Book
      ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL);
    
      if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) {
        ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error) {
          if (granted) {
              // First time access has been granted, add the contact
              [self _addContactToAddressBook];
          } else {
              // User denied access
              // Display an alert telling user the contact could not be added
          }
        });
      }
      else if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) {
        // The user has previously given access, add the contact
        [self _addContactToAddressBook];
      }
      else {
        // The user has previously denied access
        // Send an alert telling user to change privacy setting in settings app
      }
    

    Update For iOS 9 and later:

    From Apple website :

    Important

    The Address Book UI framework is deprecated in iOS 9. Use the APIs defined in the ContactsUI framework instead. To learn more, see ContactsUI

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

Sidebar

Related Questions

Since updating to the latest JQuery I have noticed that all my getJson calls
Ever since updating to the latest ADT (version 18), I've noticed that there seems
Since updating to Lion I can't install configuration profiles with the iPhone Configuration Utility
I have a script for building my app that is broken since updating to
I am currently designing an iOS 5 iPhone app that will use a .NET
Since updating my SDK Tools to r12, an existing project (with zero code changes)
I have an app that works correctly on Android and iOS, but currently fails
Since updating to version 3.0.1 of MonoDevelop, I've been unable to work with layout
Since regular jQuery animations are not fluent on iOS ( .hide() , slideDown() ),
Since I am developing an iOS >= 5.0 application, I am trying to change

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.