Access to webview cookie jar

NSArray *httpCookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:httpUrl];

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPCookieStorage_Class/

@Override
public void onPageFinished(WebView view, String url){
    String cookies = CookieManager.getInstance().getCookie(url);
    Log.d(TAG, "All the cookies in a string:" + cookies);
}

https://developer.android.com/reference/android/webkit/CookieSyncManager.html

webview.eval can work however to get cookie data, I think

I haven’t looked into this myself, but maybe @Mathias_Westerdahl knows? He was the one who implemented webview support.

Hi!
I’m afraid cookies was a topic that wasn’t looked at in this first implementation. There is no planned ticket. And I’m sorry to say that I haven’t looked into using the webview.eval function for handling cookies either. I think it would be good if someone could try out the webview.eval function to see if it works, then we’d know if we need to do more to support cookies.

1 Like