Trying to go through the upgrade to WKWebView.
Thanks for the suggestions.
I’m really confused why there is not a more official fix for these issues from either Cordova or Ionic.
Issue 1- Can’t set cookies from within WKWebView – document.cookie no longer works when using WKWebView. No official ionic fix? Nothing I can see in Ionic WKWebView documentation that warns about this problem with the upgrade to WKWebView (maybe it started in ios 11?)
Is there a way to allow cookies to be set. The only work around is to use local storage. I think?
Issue 2- Setting cookies fails on first load of app and first call with an API request. Seems to be an issue with WKWebView cookie manager (whatever it is call). I don’t know if its an initialization or timing issue.
Some of the suggested plugins seem to be forks of others. Not sure which one is the best to use and why?
Other suggestion is to go back to use local storage. The only way to read set-cookie from a request is allow from the server side.
I’m not sure of the security implications of doing such.
Is there any “official” fix for these issues?
Furstrted there is not offical fix.
I was using this plugin
cordova-plugin-wkwebview-inject-cookie (or some version of it).
Worked fine in IOS 13.5 but does not work in ios 14+. I’m starting over.
Most of these plugins were written years ago. I don’t like using old plugins if I don’t have to.
Anybody have cookies working on startup with IOS 14+ ???
Bu in this plugin if you clear the app from background , use clearCookies() method it doesn’t works in IOS