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
1
vote
0 answers

Swift - ABAddressBookRegisterExternalChangeCallback

I am trying to register an address book change callback in swift but can't seem to find how to do it. I know how do get a notification on address book change for iOS 9 but I need for iOS 8 as well. if #available(iOS 9.0, *) { …
daniel3223
  • 141
  • 1
  • 9
1
vote
0 answers

Check if contact already present in abaddressbook

I have a app which takes backup for contacts. All records are sent to server in NSData format. Also I have put restore functionality. Issue is duplicate record is created in phone contact. I wanted to compare ABrecordId. But when I restore and get…
Durgaprasad
  • 1,910
  • 2
  • 25
  • 44
1
vote
2 answers

How to add address properties in Address Book?

I'm trying to add new contact to the iPhone Address book using ABAddressBook. Adding first/last name works fine, but I get errors when I'm trying to add country, street, city, etc. I get an error when I use kABPersonAddressCountryCodeKey or…
Eugene
  • 113
  • 1
  • 7
1
vote
0 answers

unable to fetch contact name using ABAddressBook framework in IOS Swift 2.0

I am using new framework Contacts for fetching contacts in IOS 9 and Also using ABAddressBook framework for fetching contact name form IOS 8.0 but in IOS 8.0 app getting crash. I am using the following code to check IOS version if #available(iOS…
1
vote
1 answer

What to set displayedPropertyKeys for CNContactPickerViewController in ios9

For lower than ios9, I used to write picker.displayedProperties = @[@(kABPersonEmailProperty)]; For ios9, what will be the displayedPropertyKeys ( picker.displayedPropertyKeys = @[@(????)]; ) Note:- picker is…
pkc456
  • 8,350
  • 38
  • 53
  • 109
1
vote
1 answer

Swift How can I remove these button programmaticaly or change their action when tapped?

In my application I have to remove this two kind of buttons or give them another function. There were 3 days reading the net and I can't even find how they are called. So to the question: How can I programmaticaly remove them, access them, change…
Hristo Atanasov
  • 1,236
  • 2
  • 18
  • 25
1
vote
1 answer

Programmatically delete custom phone labels

In iOS it is possible to create custom labels for phone numbers and email addresses. Is there a way to remove those created labels programatically (either with CNContacts or ABAddressBook)? In other words: I don't want to delete the custom label…
hashier
  • 4,670
  • 1
  • 28
  • 41
1
vote
1 answer

Is there any way to find out that a user is removing an iOS App from device programmatically?

I have a set of contacts that can be synched from my ios app to device address book. When the user deletes the app from the device, I want to remove those contacts from device address book as well. But as far as I know, Apple does not provide a way…
JamesDon
  • 65
  • 1
  • 9
1
vote
1 answer

Is it possible to create a temporary ABAddressBook Database in iOS?

I would create a temporary ABAddressBook Database in iOS which doesn't interact with the "normal" ABAdressBook database. I would just like to do it to use the ABPersonViewController. My contacts data is stored in an sqlite.swift database.
Philipp Januskovecz
  • 868
  • 5
  • 14
  • 25
1
vote
1 answer

App crashing while fetching contact numbers from iPhone in SWIFT

I am trying to get the contacts using the following code: var addressBook: ABAddressBook! let addressBookRef: ABAddressBook = ABAddressBookCreateWithOptions(nil, nil).takeRetainedValue() var arrContacts = [""] var personNameContactNo:[String:…
AAA
  • 1,957
  • 4
  • 23
  • 42
1
vote
0 answers

Contacts not showing for first time in swift

When I try to load the table view with the list of contacts, it is not showing for the first time. But if I try Pull-To-Refresh or go to some view and come back to table view controller, the contacts are loading and showing perfectly. Here is the…
AAA
  • 1,957
  • 4
  • 23
  • 42
1
vote
1 answer

Duplicate contact with ABAddressBook

I'm using ABAddressBook, I can display every contact, but I've some duplicate contact. I've read this topic : Dealing with duplicate contacts due to linked cards in iOS' Address Book API, but can't fix the problem. I would like to use this code in…
Vjardel
  • 1,065
  • 1
  • 13
  • 28
1
vote
3 answers

Sort UITableView content (Address Book) alphabetically

Below is what I am using to retrieve the contacts list from the device. I want it to be displayed alphabetically but using other examples seen on stack overflow I have been unable to get it to work. The code below is from a tutorial, what do I need…
Manesh
  • 528
  • 6
  • 20
1
vote
0 answers

Swift: Highlighting Item of ABPersonViewController

The ABPersonViewControllerDelegate protocol requires that the method func personViewController(personViewController: ABPersonViewController!, shouldPerformDefaultActionForPerson person: ABRecord!, property: ABPropertyID, identifier:…
Randoms
  • 2,110
  • 2
  • 20
  • 31
1
vote
1 answer

Swift: Set Address Property of ABRecord

I took a look at the SE question here [Avinash's answer] and the Apple resource here [bottom of page 18 and top of page 19] in my attempt to set an address for an ABRecord. I did my best to translate them from Objective-C, but apparently I made an…
Randoms
  • 2,110
  • 2
  • 20
  • 31