ABAddressBookCopyArrayOfAllPeople and ABAddressBookGetPersonCount return different sizes

前端 未结 3 1869
孤独总比滥情好
孤独总比滥情好 2021-01-02 20:17

I have an app which crashes occasionally due to the array returned by ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering() having a different size to ABAddressBookGet

3条回答
  •  时光说笑
    2021-01-02 21:10

    @Jokinryou Tsui Passing source as nil was the key, thanks! It seems like the source types may correspond to this documentation from Apple : https://developer.apple.com/library/ios/documentation/AddressBook/Reference/ABSourceRef_iPhoneOS/#//apple_ref/doc/constant_group/Source_Types

提交回复
热议问题