This addresses issue #11, which is a crash caused by getABPersonThumbnailFilepath returning nil.
ABPersonHasImageData can return true even if the contact has no image. This is because Apple Contacts allows you to link one or more contacts together.
What this PR does is makes getABPersonThumbnailFilepath scan through a contact’s linked people with ABPersonCopyArrayOfAllLinkedPeople, and find the one that does have an icon, and use that.
And if that fails, it now returns @"" and doesn't crash.
This addresses issue #11, which is a crash caused by
getABPersonThumbnailFilepath
returningnil
.ABPersonHasImageData
can returntrue
even if the contact has no image. This is because Apple Contacts allows you to link one or more contacts together.What this PR does is makes
getABPersonThumbnailFilepath
scan through a contact’s linked people withABPersonCopyArrayOfAllLinkedPeople
, and find the one that does have an icon, and use that.And if that fails, it now returns
@""
and doesn't crash.