Flutter WebView: Cookies don't seem to persist on old iPhones

Viewed 111

I am using webview_flutter package and the persistance of the cookies is not working on physical device iPhone 6, but on iPhone XR works.

iPhone XR uses iOS 15. iPhone 6 uses iOS 12.

The cookie insertion is in the onPageFinished

await webViewController
        ?.runJavascript('document.cookie="ADST=$token;"');

After that in order to check I'm getting the cookies like this and the ADST is there:

cookies = await webViewController!
      .runJavascriptReturningResult('document.cookie');

but after the function ends and the webview loads the url the cookie is not there anymore.

0 Answers
Related