2

I'm trying to set cookies on a dataTask on NSURLSession.sharedSession(), obtained from a webpage in a WKWebView instance.

Somehow when reading the cookies from NSHTTPCookieStorage.sharedHTTPCookieStorage() after visiting the webpage with cookies set from the server, I'm not always getting the cookies the first attempt reading them. It seems that WKWebView uses some background proces/scheduling for persisting the cookies... anybody with experience/best practices/workaround for this, or maybe I'm just doing it wrong?

tapmonkey
  • 141
  • 2
  • 9
  • Anyone facing the same problem: http://stackoverflow.com/questions/33156567/getting-all-cookies-from-wkwebview helped me for now. – tapmonkey Jul 01 '16 at 11:23

0 Answers0