Question

ABPerson has api to get all "linked" person records.

CFArrayRef ABPersonCopyArrayOfAllLinkedPeople (
   ABRecordRef person
);

What determines the return result of this call (i.e. how are links established)? My goal is to create a new address book record (in code) that is linked to an existing record.

Was it helpful?

Solution

I've accomplished this by trying to write the information to the ABRecordRef in question, as well as the records linked to it. If writing to all linked records fails for permission (in the case that the only record is a Facebook contact, for example) I created a new record with the same first and last name as the existing record(s) and address book linked them. That behavior isn't documented anywhere, but with out a public method to link contacts, it might be the only option.

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