A package that uses the Expo FileSystem API to download files to a mobile device.
You need to download files to a mobile device, and you need to be able to download files again when their versions change.
You're not downloading files to a mobile device
npm install --save versioned-file-downloader
or
yarn add versioned-file-downloader
And import like this
import versionedFileDownloader from 'versioned-file-downloader';
Call the asynchronous versionedFileDownloader and pass it the parameters shown below to save the files to a directory of the form [device document root return by Expo FileSystem API]/[package name]/[version]/
let downloadStatus = await versionedFileDownloader(
this.webViewDownloadStatusCallBack,
{
name: config.PACKAGE_NAME, // the name of the package, this will be the root directory for the files
version: config.PACKAGE_VERSION, // the version number, this will be a subfolder of the root that the file will be saved to
files: FILES_TO_DOWNLOAD, // the files to be saved
}
);