Questions tagged [abaddressbook]

The ABAddressBook opaque type provides a programming interface to the Address Book — a centralized database used by multiple applications to store personal information about people. Available on iOS 2.0 or above , and Mac OS X

The ABAddressBook opaque type (whose instances are known as address books) provides a programming interface to the Address Book—a centralized database used by multiple applications to store personal information about people. The Address Book database also supports the notion of a “group” containing one or more persons. People may belong to multiple groups, and groups may also belong to other groups.

The ABAddressBook opaque type provides functions for creating references to the Address Book database, saving changes, discarding changes, and registering for changes made externally (by other threads or processes) to the database.

812 questions
73
votes
13 answers

Get a list of all contacts on iOS

I want to get a list of all contacts of an iPhone. I checked Address Book reference, I may missed something but I didn't see it provides a method to get a list of contacts.
Chiron
  • 19,366
  • 15
  • 74
  • 132
46
votes
2 answers

App crashed in iOS 6 when user changes Contacts access permissions

I have an app that uses the Address Book. When running in iOS 6 it runs this code when the user does something that requires Address Book access. if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) { …
Alexey Blinov
  • 1,674
  • 3
  • 17
  • 24
44
votes
9 answers

Accessing iOS Address Book with Swift: array count of zero

I am trying to write a simple method to ask a user for access to their address book and then print out the name of each person in the address book. I've seen a number of tutorials explaining how to do this in objective-C, but am having a hard time…
user1031648
  • 553
  • 1
  • 4
  • 9
42
votes
2 answers

Toggling Privacy settings will kill the app

I have an app that uses the iPhone's contacts. With iOS 6, the user will be prompted for Contact access on the first try. At this point, the user can hit 'Allow' or 'Don't Allow'. The problem is when the user backgrounds the app, and then navigates…
rocky
  • 3,375
  • 1
  • 19
  • 30
38
votes
5 answers

Dealing with duplicate contacts due to linked cards in iOS' Address Book API

Some beta-users of my upcoming app are reporting that the list of contacts contain a lot of duplicate records. I'm using the result from ABAddressBookCopyArrayOfAllPeople as the data source for my customized table view of contacts, and it baffles me…
epologee
  • 10,851
  • 9
  • 64
  • 102
34
votes
4 answers

How do I correctly use ABAddressBookCreateWithOptions method in iOS 6?

I am trying to understand the ABAdressBookCreateWithOptions and ABAddressBookRequestAccessWithCompletion methods in iOS 6. The most information i have been able to find is the following, "To request access to contact data, call the…
codeqi
  • 753
  • 1
  • 6
  • 14
23
votes
1 answer

Contact Framework equivalent to ABAddressBook.ABAddressBookRegisterExternalChangeCallback

I am migrating an application from the deprecated Address Book Framework to the new Contacts Framework. The application utilizes ABAddressBookRegisterExternalChangeCallback to be notified when another application changes a contact. I am unable to…
me--
  • 1,412
  • 13
  • 36
21
votes
5 answers

How does Square's CardCase app automatically populate the user's details from the address book?

Square's new card case iOS app has a "Create Account" feature. Tap it and it shows a form PREPOPULATED with the user's entry from the Address book. How is this possible? Anyone know? I thought this was unpossible, to get the user's info this way.…
Genericrich
  • 4,530
  • 4
  • 33
  • 53
19
votes
3 answers

How to select a contact with ABPeoplePickerNavigationController in Swift?

I have added the ABPeoplePickerNavigationController into my first view controller. I want that when I select a contact show the info to show in other view controller, but I'm trying use my code and this not show never when I click in a contact. This…
user3745888
  • 5,443
  • 14
  • 43
  • 85
19
votes
1 answer

iOS - How to search a "searchable" ABSource, with ABSourceType | kABSourceTypeSearchableMask

Has anyone ever succeeded in searching for names in an Exchange GAL linked to an iOS device, using ABAddressBook framework, or otherwise? I've managed to get all the names from the contacts stored on the device - that bit's easy - but it doesn't…
Sam
  • 5,822
  • 1
  • 22
  • 27
16
votes
2 answers

What to do with this message?

I use iOS 8 objective-c. I receive this message after select contact from contact list. plugin com.apple.MobileAddressBook.ContactsViewService invalidated What to do with this message? Thanks
user3428151
  • 431
  • 6
  • 21
16
votes
1 answer

Is ABRecordID a reliable way to identify unique contacts?

My app uploads contacts, and, in the future, will need to update them. Is using the ABRecordID a reliable way to identify people, or is it possible for a new record to obtain the ID of a deleted record? To optimize uploads, I would like to upload…
JeffRegan
  • 1,302
  • 9
  • 24
16
votes
2 answers

How can I reset Contact access permission, so OS X will ask again?

I know I can turn on and off permission in System Preferences -> Security & Privacy -> Privacy -> Contacts, but what I want to do is force OS X to ask for permission again. This is for testing purposes... I.e. I maybe have a bug that gets triggered…
Kenny Winker
  • 11,513
  • 7
  • 50
  • 77
15
votes
4 answers

Get iPhone phone number label from Address Book

So I have a method to get all the contact phone numbers from the address book on the iPhone, but is there a way to get the phone number label? For example you can do this: And I'd be looking to modify my method to print out the label (such as…
ingh.am
  • 24,319
  • 41
  • 126
  • 176
14
votes
3 answers

how to sort iphone contact book?

How can i sort (or retrieve sorted array of ) an iphone contact book by first name & last name programmatically ?? Any help will be well appreciated...! Thanks
Matrix
  • 7,431
  • 13
  • 61
  • 93
1
2 3
54 55