Local Storage not working in XPUB 2.0/WKWebView

  1. 6 months ago

    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;
    }
    //------------------------------------------------------------------------

  2. 5 months ago

    Angelo S

    Jun 4 Administrator

    Hello John, will definitely look into this and let you know.

  3. 4 months ago

    Angelo S

    Jun 26 Administrator

    Hello John, PubCoder 3.5.5, released yesterday, should fix this issue.
    Please let me know is local storage works correctly when generating your app with the latest update of PubCoder.

  4. Hello Angelo, Thanks a lot - yes, local storage now works perfectly.

 

or Sign Up to reply!