Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

126
Visualizações
Saving file from Chrome IOS is not working?

I am trying to make this work, I want to be able to download a file from a website, I'm using an NPM package called file-saver and also tried a solution in one of the answers here, yes it works but the problem is it is not working on chrome iOS, for some reason anyone found out what could be the solution to this ? Is it that chrome is so strict it doesn't allow you to download anything?

const saveLocalStorage = () => {
    // Grap the whole ls object and save
    const ls = JSON.stringify(localStorage);
    // Using file Saver NPM
    //FileSaver.saveAs(new Blob([ls]), 'Plan.Online', { autoBom: true });
    const downloadBlob = (fileName: string, blob: any) => {
      const link = document.createElement('a');
      link.href = URL.createObjectURL(blob);
      link.target = '_blank';
      link.download = fileName;
      document.body.appendChild(link);
      link.click();
    };

    const blob = new Blob([ls], {
      type: 'text',
    });
    downloadBlob('Data.txt', blob);
  };

about 4 years ago · Santiago Gelvez
2 Respostas
Responde à pergunta

0

If your app works in iOS Safari, but not in iOS Chrome browser, the issue may be how Apple has Chrome configured.

From this reference

Google Chrome is now available for the iPhone and iPad, but before you get too excited, you need to realize that it isn't Chrome at all. It's Apple's Safari with a 'chrome' interface. The actual browser, the rendering, and javascript engine is 100% Apple Safari.

The reason is simple. Apple wants control and force people to create native apps, and are thus limiting the performance of web apps in third party apps. ... This is purely anti-competitor behavior that limits choice and forces people to create native apps.

When I write Progressive Web Apps (PWA), I have to tell my users that they have to use the OS native browser. Android=Chrome, iOS=Safari. Period. No substitutes. Apple clearly doesn’t want universal browser code functionality.

Note: I know that reference above is pretty old. But as far as I know the essence of the facts still stand. Note: I'm coming at this from the perspective of developing Progressive Web Apps. The one feature I really rely on is the ability to "Save link to home page". And that is just not available in Chrome on iOS, even now. Not sure you have exactly the same use case.

about 4 years ago · Santiago Gelvez Relatório

0

i found this discussion may related! a chrome engineer says: "Ah, that's because Chrome on iOS hasn't yet adopted the new WKDownload delegate methods, but this is currently being worked on (see crbug.com/1252380)"

https://bugs.webkit.org/show_bug.cgi?id=167341#c66

about 4 years ago · Santiago Gelvez Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda