girish2711 commented on pull request #1030:
URL: https://github.com/apache/cordova-ios/pull/1030#issuecomment-761812657


   Bringing comments added for #1004 
   
   
   @NiklasMerz Thanks for the WKURLSchemeHandler implementation. I took #1030 
PR and integrated with your plugin 
https://github.com/GEDYSIntraWare/cordova-plugin-webview-proxy. Also changed 
the URL per your suggestion. All my XHR calls are now directed to webiewproxy.m 
and completes with proper response.
   
   However, in my case my API responds with a few session cookies and I don't 
see them getting synced to my Cordova main web view. I see cookies in native 
cookie store but not in Cordova main web view. Is this expected ? Any solution 
to this?
   
   I have a Single Sign On implementation which needs these session cookies to 
be sent along with http GET URL request (window.location = url to a subdomain) 
to a my own server. But the request is sent without cookies and hence it fails.
   
   I tried by configuring CDVWebViewEngine's webdatastore to a nonPersistant 
one and added cookies to the same store as in below, but that didn't sync 
cookie to Cordova Main webview
   
   first added app bound domain in the info.plist
   
   and then in CDWebViewEngine:77.
   
   if (@available(iOS 14.0, *)) {
   
    configuration.limitsNavigationsToAppBoundDomains = YES;    
    WKWebsiteDataStore *dStore =[[CDVWebViewProcessPoolFactory sharedFactory] 
sharedDataStore]; // by adding new method in sharedFactory
   
       configuration.websiteDataStore = dStore; 
   } else {
       // Fallback on earlier versions
   }
   and in webviewproxy.m:40
   
   WKWebsiteDataStore* dataStore = [[CDVWebViewProcessPoolFactory 
sharedFactory] sharedDataStore];
       WKHTTPCookieStore* cookieStore = dataStore.httpCookieStore;
   Any idea if cookies are not meant for syncing or am I missing something ? I 
am testing in iOS14 with XCode 12.3.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to