# iOS App Storage cleared after app restart

**URL:** <https://forum.ionicframework.com/t/ios-app-storage-cleared-after-app-restart/71803>\
**Category:** ionic-v3\
**Created:** [November 30, 2016, 11:23am UTC](https://forum.ionicframework.com/t/ios-app-storage-cleared-after-app-restart/71803 "2016-11-30T11:23:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beezerk](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@beezerk](https://forum.ionicframework.com/u/beezerk)\
**Post date:** [November 30, 2016, 11:23am UTC](https://forum.ionicframework.com/t/ios-app-storage-cleared-after-app-restart/71803/1 "2016-11-30T11:23:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mirkonasato](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mirkonasato/32/131398_2.png) [@mirkonasato](https://forum.ionicframework.com/u/mirkonasato)\
**Post date:** [November 30, 2016, 12:18pm UTC](https://forum.ionicframework.com/t/ios-app-storage-cleared-after-app-restart/71803/2 "2016-11-30T12:18:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![beezerk](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@beezerk](https://forum.ionicframework.com/u/beezerk)\
**Post date:** [November 30, 2016, 12:30pm UTC](https://forum.ionicframework.com/t/ios-app-storage-cleared-after-app-restart/71803/3 "2016-11-30T12:30:45Z")

</div>

yeah thanks.

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

```

did it for me
