1 Reply
      Latest reply on Jul 2, 2019 2:43 AM by USAfirefighter
      USAfirefighter Level 1 Level 1 (0 points)

        I generated an XML String in JavaScript and I need to download it as a file. I tried both answers provided in here.

        Answer 1

        Answer 2

        Both answers work perfectly fine on MacOS Safari, iOS Safari and Raspbian Chromium, but when I try to download within the PWA on the iPad iOS 12.1.4, it does simply nothing. No Errors in console either.

        If I try downloading in a new tab, it just shows a white screen and nothing happens.

        • Re: How to download locally generated text in a PWA?
          USAfirefighter Level 1 Level 1 (0 points)

          I've done some testing involving iOS 13.

          It appears to be working on iOS 13, yet even the html5 attrbute 'download' to specify the file name works.

          I ran into a possible bug though;

          Using href for download pops up the iOS sharing menu but it does not let you close it. In order to use the app again, it needs to be closed.

          Using window.open() it will let you close the sharing menu but the file name is not supported. Also a possible bug?

          Anyway when I add target='_blank' to the href, it still does not let you give the option to close the sharing menu.