Updating to WkWebView

Hi,

I’m looking for some advice from the community. I have an old project that uses ionic v1 which uses the ngStorage to store some data and configuration.

Since Apple is deprecating UIWebView, we will need to update to WkWebView. From what I understand, doing so will make current users lose the data saved in localStorage as the new webview will remove the data.

What’s the best way to keep the data? My plan is to install sqlite plugin and copy over the data from localStorage into the sqlite database asap. Then when all users have updated, we can then update to WkWebView. Does this work or is there a better way?

Alternatively, I guess I could try to see if I can put all the data into a TXT file and see if that works too.

Appreciate if there’s any other recommendations!

The SQLite plugin idea could work.

Alternatively, does your app have user accounts, with data managed in a backend?

Basically, if you get the data out of LocalStorage and into native storage or a backend, I’ll think that will work.

Yes, we do have a backend and data is synced over whenever there is network connection. The localStorage is to store offline data when the device doesn’t have any network connection. It’s temporary until the network is connected again, then it will sync to the backend.

Other data are the settings that varies per user. If they lose that, then we will need to get everyone to reconfigure again which is what we are trying to avoid.

I think I’ll try out the sqlite. Is there any particular plugin I should be using?