Local Storage not working in XPUB 2.0/WKWebView

  1. last week

    It seems that Local Storage is not working with XPUB 2.0/WKWebView - published as an iOS app.

    It does work as long as an app is open - saving changes of values when going between pages.
    But it doesn't read the saved values after closing an app and reopen it.

    I am not using Session storage but storage without any expiration.
    It has always worked before XPUB and WebView were updated.
    Has anyone got it to work?

    here's my code that used to work:
    //------------------------------------------------------------------------
    if (localStorage.getItem("myVarName") === null) {
    localStorage.myVarName = "true";
    mySavedValue = localStorage.myVarName;
    }else{
    mySavedValue = localStorage.myVarName;
    }
    //------------------------------------------------------------------------

 

or Sign Up to reply!