Found that without the wkwebview plugin (cordova-plugin-wkwebview-engine) the problem does not occur. Is looks a bit like what is described here (Although that applies to the telerik version of this plugin):
Take a look at cordova-plugins/wkwebview-engine-localhost at master · apache/cordova-plugins · GitHub. You can hardcode a port in your config.xml so that the webview always gets the same local storage. (I use port 49000 in my apps, and it works fine).
<platform name="android"> <content src="index.html" /> </platform> <platform name="ios"> <content src="http://localhost:49000"/> </platform>
Thanks for your reply.
I am unable to get a working version of the wkwebview-engine-localhost included in my PGB builds. There appears to be a version on NPM, but thats a cocoon-xxxx version. Using that version gives me a beautiful but somewhat useless black screen after the splash.
Including the git version also keeps giving errors.
Just not my day I guess;
I've finally solved it by using the local-webserver plugin from NPM and configuring the port to a fixed value as suggested.
I have excluded the cordova-plugin-wkwebview-engine plugin since the local-webserver automatically includes that one.