I am trying to export VCF files from selected contacts with photos. I have a method to manually append the Base64 of the contacts photo to the vCard but, the file becomes unreasonably large when exporting many contacts with many photos.
Does anyone have any idea how to achieve smaller sizes? I have seen vcf
files with photos with X-IMAGETYPE:PHOTO
and X-IMAGEHASH:
keys that makes it significantly smaller. How do i get this from the CNContact
?
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iOS 15.1.1//EN
N:;Iby;;;
FN:Iby
item2.X-ABLabel:mobile
item3.TEL:+234 111 1111 1111
X-IMAGETYPE:PHOTO
X-IMAGEHASH:iWVBwrH/HzmeyhAD6anc6Z==
END:VCARD