[ 
https://issues.apache.org/jira/browse/CB-12074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883834#comment-15883834
 ] 

Shazron Abdullah commented on CB-12074:
---------------------------------------

Thanks [~ykpole]

To summarize:
1. This is a WebKit bug, still unfixed as of today: 
https://bugs.webkit.org/show_bug.cgi?id=140191
2. The workaround is described here: 
https://github.com/Telerik-Verified-Plugins/WKWebView/issues/247#issuecomment-239709819

In essence, the workaround in the plugin is to:
1. Implement the 'decidePolicyForNavigationResponse' delegate method in the 
WKNavigationDelegate (which is handled in CDVWKWebViewEngine.m)
2. In the delegate method above, copy the cookies from the server response into 
NSHTTPCookieStorage

This would copy cookies on every navigation action. The method above has not 
been tested.

> Cookies are ignored on first application execution
> --------------------------------------------------
>
>                 Key: CB-12074
>                 URL: https://issues.apache.org/jira/browse/CB-12074
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin WKWebViewEngine
>         Environment: Cordova 5.4.0, iOS 9.3.5
>            Reporter: Maxim
>            Assignee: Shazron Abdullah
>
> Our application authenticates to the server. The server sets a 'JSESSIONID' 
> cookie. The cookie is used by the server for session management. 
> The issue is WKWebView does not send this cookie back to the server on 
> subsequent requests. However, this only happens on first execution of the 
> application, after its installation. Once the application closed and 
> re-opened, the cookies are properly sent and authentication completes 
> successfully. 
> The problematic behavior is consistent, and was observed on several devices. 
> On the other hand, there are no such issues with UIWebView. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to