Ios – WKWebView cookie storage location

iosobjective-cwkwebview

I am transitioning an app from UIWebView to WKWebView and there's an auto login feature that was handled by saving a cookie with the information that the user was authenticated into NSHTTPCookieStorage. However WKWebView does not seem to look at this location for the cookie and therefore the user is prompted with the login screen every time.

Is there something I need to activate to have the WKWebView use cookies properly?

Best Solution

For now WKWebView and UIWebView does not co-work properly together, due to not sharing of same cookie storage space. It is been discussed in depth in following answer. How can I retrieve a file using WKWebView?

Lets hope Apple fix this in upcomming update.

Related Question