I need to share cookies between WKWebView instances - for this i'm using a single WKWebViewConfiguration instance which is then used to init every WKWebView.
In order to do this I assume I have to use a shared WKProcessPool, ex:
let websiteDataStore = WKWebsiteDataStore.default()
websiteDataStore.httpCookieStore.add(self)
let configuration = WKWebViewConfiguration()
configuration.websiteDataStore = websiteDataStore
configuration.processPool = WKProcessPool() /* !!! */
However doing so causes the setCookie completion handler to NOT fire.
let cookieStore = self.webConfiguration.websiteDataStore.httpCookieStore
cookieStore.setCookie(cookie, completionHandler: {
})
If i do not set the WKProcessPool (*) instance - then completion block fires fine, but obviously WebViews do not see the cookies ; / Did anyone encounter this? Ideas on how else to share the cookies?
iOS: 11.2.6