iOS App Storage cleared after app restart

Hey there,

im using ionic2 and since i update to the newest version i got problems with the “storage” provider. As the title says above the storage seems to get cleared after i close the app and start it again.

This is how i try to get the data

this.storage.get('data')
  .then((data) => {
    console.log(data)
  },
  (err) => {
    console.log(err)
  });

I bind storage like this
import {Storage} from "@ionic/storage";
constructor(private storage:Storage)

Does anyone has the same problem? I tried it with localforage

Could be related to this issue: https://github.com/driftyco/ionic-storage/issues/20

yeah thanks.

platform.ready().then((readySource) => {
      console.log('Platform ready from', readySource);
      // Platform now ready, execute any required native code
    });

did it for me