Open oldots opened 1 year ago
Hi! with this code I was able to show a preview of the VCard directly, without going through the download folder on iPhone.
let fileURL = `data:text/vcard;charset=utf-8, ${encodeURIComponent(
vCard.getFormattedString(),
)}`;
let fileLink = document.createElement('a');
fileLink.href = fileURL;
fileLink.setAttribute('download', `./${username.value}.vcf`);
document.body.appendChild(fileLink);
fileLink.click();
vcards-js is not working on ios. Tried everything from our end. It gets downloaded on safari but user needs to go to download folder to check if it downloaded and then it does not show option to save. it just show contact card and no option to save on iphone device. on Chrome, vcf card does not get download at all. It is working absolutely fine on android devices though. We are using it on our webapp to download user contact card.