Hi
I am using a WKWebView and the site is working. Now I need access to cookies that are being set. I found some code, but the cookies are always coming up with a count of 0. When I connect using Safari-WebInspector I am able wo see that the cookies are actually there. Help!
let cookieManager = NSHTTPCookieStorage.sharedHTTPCookieStorage()
cookieManager.cookieAcceptPolicy = NSHTTPCookieAcceptPolicy.Always
cookieStore = cookieManager.cookies!
logger.log("cookies: " + cookieStore.description);
output: cookies: []
I am seing that they show Expire Date of December 31 2000 in WebInspector, but when I connect via computer they show only Session for expiration. Do I need to alter the site javascript and change the cookie expiration somehow?