Hi team, I recently upgraded ionic storage from V2.2.0 to V3.0.6 in an ionic app. I'm facing IOS specific issue after the upgrade, IOS app doesn't retain login credentials after app kill which was retaining in ionic/storage(2.2.0) . Could you please help me to understand what I’m missing here ?
Code snippet after the upgrade:
import { IonicStorageModule } from '@ionic/storage-angular';
import { Drivers } from '@ionic/storage';
import * as CordovaSQLiteDriver from 'localforage-cordovasqlitedriver';
import { Storage } from '@ionic/storage-angular';
@NgModule({
imports: [
IonicStorageModule.forRoot({
driverOrder: [CordovaSQLiteDriver._driver, Drivers.IndexedDB, Drivers.LocalStorage]
})
]})
Important: I’ve injected Storage service in multiple custom services, I replaced this.storage.ready() with this.storage.create() after the upgrade. Just curious to know if I’ve multiple occurrences of this.storage.ready() in a custom service and if I replace it with this.storage.create(), does it create a new instance every time getState() gets called ?
Hi team, I recently upgraded ionic storage from V2.2.0 to V3.0.6 in an ionic app. I'm facing IOS specific issue after the upgrade, IOS app doesn't retain login credentials after app kill which was retaining in ionic/storage(2.2.0) . Could you please help me to understand what I’m missing here ?
Code snippet after the upgrade:
These are my env versions:
Code Before upgrade
Code after upgrade:
Important: I’ve injected Storage service in multiple custom services, I replaced this.storage.ready() with this.storage.create() after the upgrade. Just curious to know if I’ve multiple occurrences of this.storage.ready() in a custom service and if I replace it with this.storage.create(), does it create a new instance every time getState() gets called ?