You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunc findDuplicateContacts(Contacts contacts :[CNContact], completionHandler :@escaping(_ result :[Array<CNContact>])->()){letarrfullNames:[String?]= contacts.map{CNContactFormatter.string(from: $0, style:.fullName)}varcontactGroupedByDuplicated:[Array<CNContact>]=[Array<CNContact>]()
if let fullNames :[String]= arrfullNames as?[String]{letuniqueArray=Array(Set(fullNames))varcontactGroupedByUnique=[Array<CNContact>]()
for fullName in uniqueArray {letgroup= contacts.filter{CNContactFormatter.string(from: $0, style:.fullName)== fullName
}
contactGroupedByUnique.append(group)}
for items in contactGroupedByUnique{
if items.count >1{
contactGroupedByDuplicated.append(items)}}}completionHandler(contactGroupedByDuplicated)}
@satishbabariya & @vvit
I found findDuplicateContacts method in document but not in source file. Can you please add that method if missing?
The text was updated successfully, but these errors were encountered: