Most of my contacts image are pulled in from image and when I do:
NSData *contactImageData = (__bridge NSData*) ABPersonCopyImageDataWithFormat(person,
kABPersonImageFormatThumbnail);
UIImage *img = [[UIImage alloc] initWithData:contactImageData];
the img here is nil. How can I get the image?
Before fetching image please check if the address does have image property using the below line.
if(ABPersonHasImageData(person)) {
//Code to fetch image
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With