IonicView storage.clear() bug

I try when app is started to remove all data saved in the storage,

in the file app.component.ts i write this code.

constructor(public platform: Platform, public storage: Storage) {;

now it works perfectly in the ionic web view and on android simulator, but if i try to start on IonicView (iOS version) the datas aren’t cleared and the app get the data from the local storage.

Any solution for me?

As we’ve discussed elsewhere, you probably don’t really need to be interacting with storage at all here, but I suspect that your problem here might be not waiting until it’s ready before trying to access it. See the section about ready() in the ionic-storage README.

1 Like

u can use in the constructor
on The device should work well