Awesome, that’s great! I’ll walk you through my process, maybe this can be helpful when working on the docs!
First I was unsure if I shall go with the community plugin or with what’s mentioned in the official Ionic docs. I tried installing the community plugin and got errors with dependencies and concluded it’d probably be better to go with the official way of doing it.
As far as the errors, this was my fault. I didn’t realise Capacitor 5 had just come out (I’m using Ionic for the first time and just started trying it out 2 weeks ago).
I was basically switching back and forth between @awesome-cordova-plugins/sqlite and capacitor-community/sqlite. With the cordova route I got stuck because the docs didn’t include any info on how to use it in non-Angular environments.
Learning in the forum that the community plugin was the way to go, I decided to stick with it for the last couple days. But my app would always crash. Yesterday I had a breakthrough though!
// SQLite Hook definition
app.AppContext.config.globalProperties.$sqlite = useSQLite({
onProgressImport,
onProgressExport,
});
I found out that this was causing my app to crash. After changing it to…
// SQLite Hook definition
app._context.config.globalProperties.$sqlite = useSQLite({
onProgressImport,
onProgressExport,
});
the app did no longer crash and I was able to successfully run the test.
What almost made me give up was not knowing which package was the right choice, the issues I ran into, as well as the docs. What would have been great for me was if the docs started out with a bare minimum example of how to run an operation. Also the order of things (non-web, web, component, utils) and the naming (web can mean multiple things to a newbie like myself - are we talking about PWAs? Electron? I’m just learning what’s possible with Ionic) was a bit confusing for me personally.
Also I didn’t know (and still don’t) what onProgressImport/onProgressExport is and does and why I can decide to not use it. isModalOpen not being initialised was another thing.
It may very well be that I’m lacking some knowledge that caused the confusion. But it’s an honest account about what gave me a hard time and I hope this helps