0

Currently I am using ionic-webview plugin version 1.2.1, ionic3, cordova 8.1.2, cordova-ios 4.5.5 and codova-android 7.1.2. And I am updating my App with ionic-webview plugin version 4.1.3, ionic4, cordova 9.0.0, cordova-ios 5.0.1 and codova-android 8.x.x.

So while updating my app I am losing the data stored in local storage. Many have suggested to go with a bridge release (2 releases. First one with all old versions AND with sq lite/ionic storage to store local data and next release with all these updates).

I don't have this bridge release option because of some other reasons. Can anyone suggest me a solution or any other plugin to solve this issue with one go (single release)

James Z
  • 12,209
  • 10
  • 24
  • 44
shekar
  • 1
  • 1
  • Can you elaborate on what you mean by "while updating my app I am losing the data stored in local storage", by updating you mean the installation from the app store or what? also would suggest to give a try to firebase offline capabilites – Camilo Casadiego Nov 14 '19 at 19:58
  • @Camilo Casadiego thanks for the response, Am storing device id and user id in local storege. Updating means: Initially am running my current prod app on xcode simulator (iphone x) (built with ionic-webview 1.2.1, cordova 8.x, ionic3...). Later am building the same app (built with ionic-webview 4.1.3, cordova 9.x, ionic4...)and targeting the same device (iphone x). After this am loosing the data I have stored in local storage – shekar Nov 15 '19 at 18:45
  • just an advice, try not to work on any kind of simulators, in my experience, it has always gave me headaches and weird behaviors so bottom line, work on a real device, also keep in mind that localStorage is just a wrapper for W3C Web Storage so its possible that data still exists, but your new build just can't access it – Camilo Casadiego Nov 15 '19 at 23:23
  • tried with this fork https://forum.ionicframework.com/t/ionic-webview-update-causes-storage-loss/152594/7. need to test more – shekar Nov 18 '19 at 22:42
  • Nope this plugin is not working as expected, the toughest part is I cannot test the persistence of local storage unless I upload the app to test flight. I cannot trust simulator or a real device. Is there ay other way to test this?? – shekar Nov 27 '19 at 20:33

0 Answers0