I am currently implementing address book in my application. But I am getting one issue with address book that is I want to pass contacts from address book according to their contact type. I mean to say that is if contact type is personal then save in personal category or if that is business type then save in business category.
But in address book I don't get any event which can categories contacts according to their type. If anyone have any idea then share with me.
I have use this code also but I always get personal type contact.
CFNumberRef recordType = ABRecordCopyValue(aSource, kABPersonKindProperty);
if (recordType == kABPersonKindPerson) {
phone_book_data.Type=[NSString stringWithFormat:@"personal"];
}
else{
phone_book_data.Type=[NSString stringWithFormat:@"business"];
}