Share

Use this plugin to allow the user to download and share files from your site.

Introduction

This plugin is used to allow the user to download and share files from your site.

Where to find: startiapp.Share

Methods

downloadFile

downloadFile: (fileUrl: string, fileName: string) => Promise<boolean>

Downloads the given file to the device. For iOS this will download the file to “On My iPhone > {{AppName}} > {{fileName}}”. For Android this will download the file to “Downloads > {{fileName}}”. Returns true if the file was downloaded successfully, otherwise false.


shareFile

shareFile: (fileUrl: string, fileName: string) => Promise<boolean>

Downloads the given file to the device’s cache folder and opens the share dialog. Returns true if the file was downloaded successfully, otherwise false.


shareText

shareText: (text: string) => Promise<boolean>

Opens the share dialog with the given text. Always returns true.