I want to store network carrier as a string (e.g. AT&T) for each contact in address book.

I found a method addPropertiesAndTypes for creating a custom property. But I am not able to find any proper example to do this.

I am using following code to iterate through contact book records:

ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef addressArr = ABAddressBookCopyArrayOfAllPeople(addressBook);
CFIndex nPeople = ABAddressBookGetPersonCount(addressBook);
for(int i=0; i<nPeople; i++) {

    ABRecordRef recref = CFArrayGetValueAtIndex(addressArr, i);

And my query is, the property will stay with value after app is closed. Are these property is getting saved in address book database?

Help needed. Thanks.

Was it helpful?


Make sure you call ABAddressBookSave().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow