Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

( iOS issue ) vcf not showing up on its own....nee to click on download folder to verify #77

Open
oldots opened this issue Aug 9, 2023 · 1 comment

Comments

@oldots
Copy link

oldots commented Aug 9, 2023

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.

@cesswhite
Copy link

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants