I am trying to obtain all related contacts to a selected contact. The way to do this seems to be via mycontact.contactRelations
. This gives an array of CNLabeledValue
with each of those containing a CNContactRelation
as their value. There is then a name
property, but it appears nothing else.
The Xamarin documentation for CNContact.ContractRelations
seems to suggest I should be able to obtain the corresponding CNContact
from a CNContactRelation
but I can see no way to do this in objc, other than searching for a contact with a matching name. This may or may not be the contact I'm after, even if they also have a relationship to a contact with the same name as mycontact
.
The identifier on the CNLabeledValue
seems to refer to the label rather than the related contact, or at least doesn't seem to match the identifier if I select that contact from a CNContactPickerViewController
.
Is there a way to obtain the CNContact
for the related contact in objc ?