I am developping an app using Ionic 4 with React.
I succeded to store data in LocalStorage using Capacitor Storage API (https://capacitor.ionicframework.com/docs/apis/storage/). It’s pretty easy to use and it is efficient.
I found a way to get what I needed… I post here in case it could help someone.
I install this package:
=> npm i @byteowls/capacitor-filesharer
Then in my React class:
import {FileSharer} from '@byteowls/capacitor-filesharer';
FileSharer.share({
filename: fileName,
base64Data: "content converted as base64 string",
contentType: " text/plain",
}).then(() => {
alert("export done!");
}).catch(alert);

You'll be able to find your file in the download folder
