Opens the share sheet of the device for an .icsFile.
When the browser cannot share files, the file downloads instead.
Call it from a user action, such as a click. Browsers reject the share sheet otherwise.
Build the file synchronously (for example with createIcsFile) so the click still counts when the sheet opens.
Some browsers, such as Chrome, do not share .ics files and download them instead.
Chrome can report that it shares the file and then reject with NotAllowedError, so that error also falls back to a download.
Resolves 'shared' after the user picks a target, 'cancelled' when the user closes the sheet,
and 'downloaded' when the browser fell back to a download.
Opens the share sheet of the device for an
.icsFile. When the browser cannot share files, the file downloads instead. Call it from a user action, such as a click. Browsers reject the share sheet otherwise. Build the file synchronously (for example withcreateIcsFile) so the click still counts when the sheet opens. Some browsers, such as Chrome, do not share.icsfiles and download them instead. Chrome can report that it shares the file and then reject withNotAllowedError, so that error also falls back to a download.Resolves
'shared'after the user picks a target,'cancelled'when the user closes the sheet, and'downloaded'when the browser fell back to a download.