ioscontactsaddressbookabaddressbookabperson

Storing kABPersonImageFormatThumbnail for an address book contact


I'm trying to store the thumbnail for a contact in the address book.

The following allows me to retrieve both the thumbnail and the full image:

ABPersonCopyImageDataWithFormat(contactRef, kABPersonImageFormatOriginalSize);
(NSData*)ABPersonCopyImageDataWithFormat(contactRef, kABPersonImageFormatThumbnail);

And this allows me to store the full image:

ABPersonSetImageData(contactRef, (__bridge CFDataRef)UIImagePNGRepresentation(selectedImage), nil);

But I cannot figure out how to store the thumbnail. There doesn't seem to be a method that takes kABPersonImageFormatThumbnail as a parameter to store the image. Is this possible?


Solution

  • I seem to get into the habit of answering my own questions. After extensive research and going through Apple's API, I finally used a TSI to send a question to Apple with this specific situation. Their reply was this:

    Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.

    So unfortunately, at this time in any case, this is not possible.