I wants to link one contact to second contact programmatically...
I've linked it from phone, but could not find any code for it.
var store = CNContactStore()
let contact = try store.unifiedContact(withIdentifier: contactIdentifier, keysToFetch:keysToFetch as! [CNKeyDescriptor])
let contactToUpdate = contact.mutableCopy() as! CNMutableContact
/* edit or append contact information */
let saveRequest = CNSaveRequest()
saveRequest.update(contactToUpdate)
try store.execute(saveRequest)