I'm learning that there's some caveats with the storage module as it stands - we're on older versions of all libraries due to the template not being up-to-date with latest, and some things have changed.
Specifically, how storage options are leveraged - the version we're using states:
As a major example, iOS will currently clear out Local Storage (and IndexedDB it's been shown) when the device runs low on memory. To avoid that, a file-based storage approach with SQLite will retain all your data.
The examples for the version we're using show cordova-based actions, not capacitor ones. Newer versions of the @ionic/storage library have capacitor examples, and have extracted angular-specifics to a separate library @ionic/storage-angular.
The capacitor preferences docs share an approach that's a little more opinionated and might be a smart conversion for our user-data.ts approach specifically for preferences like themes, filters, etc.
I don't know if it's worth pursuing this as a larger conversion right now, or whether the off-chance of losing some user state is worth an overhaul - I'm thinking not for now.
I'm learning that there's some caveats with the storage module as it stands - we're on older versions of all libraries due to the template not being up-to-date with latest, and some things have changed. Specifically, how storage options are leveraged - the version we're using states:
The examples for the version we're using show cordova-based actions, not capacitor ones. Newer versions of the
@ionic/storage
library have capacitor examples, and have extracted angular-specifics to a separate library@ionic/storage-angular
.The capacitor preferences docs share an approach that's a little more opinionated and might be a smart conversion for our
user-data.ts
approach specifically for preferences like themes, filters, etc.I don't know if it's worth pursuing this as a larger conversion right now, or whether the off-chance of losing some user state is worth an overhaul - I'm thinking not for now.
Originally posted by @miketheman in https://github.com/psf/pycon-us-mobile/issues/37#issuecomment-1503014561