Dealing with duplicate contacts due to linked cards in iOS' Address Book API

前端 未结 5 2000
挽巷
挽巷 2020-12-12 14:19

Some beta-users of my upcoming app are reporting that the list of contacts contain a lot of duplicate records. I\'m using the result from ABAddressBookCopyArrayOfAllPeople a

5条回答
  •  遥遥无期
    2020-12-12 14:58

    I'm getting all sources ABAddressBookCopyArrayOfAllSources, moving the default one ABAddressBookCopyDefaultSource to the first position, then iterate through them and getting all people from source ABAddressBookCopyArrayOfAllPeopleInSource skipping ones I've seen linked before, then getting linked people on each ABPersonCopyArrayOfAllLinkedPeople.

提交回复
热议问题