I to had the same issues with this WKHTTPCookieStorage, i created a wrapper method that would add an array of cookie async and on completion it would load the URLRequest in the WKWebView, however when it gets into decidePolicyFor navigationAction method the wkwebview cookies are not the ones i set before in WKHTTPCookieStorage, i believe WKProcessPool is the one responsible for the cookies to be in sync, and it seems that settings cookies in a webview that is created and has a configuration, does not mean that they will be in the wkwebview when the webpage starts loading. i actually created a post with what seems to be a similar issue to yours.https://forums.developer.apple.com/thread/97194It would be good to know if this is by design, or is it potentially a bug. If it is by design why does this happen, and what workarounds can be used.
Topic:
App & System Services
SubTopic:
Networking
Tags: