문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top