I'm trying to capture the given name of a contact when the user selects that contact from the Contact Picker. Right now I'm using this method
func contactPicker(_: CNContactPickerViewController, didSelect: CNContact){
print("Selected Contact")
}
It works but I don't see how I can get a reference to the contact object that was selected. I was trying to reference these properties CNContact
The second parameter is the selected
CNContactobject. Note thecontactnext to thedidSelectwhich is missing in your example. In your example you have to usedidSelectparameter which is yourCNContactbut contact would be a much more expressive name.