I have a web app where, when user submits a form, iCalendar .ics
file is generated server-side and sent back to client with following headers:
'Content-type': 'text/calendar; charset=utf-8',
'Content-Disposition': 'inline; filename=calendar.ics'
While doing this on iOS in Safari browser, the file is processed correctly (event is added to Calendar), but when the app is accessed from home screen, Downloaded Failed This file cannot be downloaded.
popup shows up.
Is there any solution to this issue? (Some people have been facing this as well.)
Edit: Just to mention, same thing happens when trying to open base64-encoded .ics file with window.location
redirection (as proposed in this answer). I've also created a JS Bin example that can be added to iOS home screen and checked both from there and browser.