cordova-plugin-webview-proxy icon indicating copy to clipboard operation
cordova-plugin-webview-proxy copied to clipboard

feature: adds setCookie/deleteCookie

Open menelike opened this issue 4 years ago • 2 comments
trafficstars

…in order to be able to set cookies on the client.

API-change: Since clearCookie() resets all cookies it has been renamed to clearCookies() to reflect this.

Fixes: Callback not being called on clearCookies()

  • [x] clarify usage of NSHTTPCookieStorage and WKWebsiteDataStore
  • [x] clarify usage of NSHTTPCookieStorage and WKWebsiteDataStore on clearCookies()
  • [ ] add API documentation

closes https://github.com/GEDYSIntraWare/cordova-plugin-webview-proxy/issues/13

menelike avatar Jun 01 '21 08:06 menelike

@NiklasMerz

I'd be happy for a review and guidance on this one. I have no experience with native development on iOS. I've tested this plugin in my cookie test app using Meteor https://github.com/risetechnologies/cookieTest, so far everything works except iFrames and the inAppBrowser

menelike avatar Jun 01 '21 09:06 menelike

@NiklasMerz

Don't ask me what I missed, but with the recent changes/revert it works in the InAppBrowser.

The IAB uses the sharedHTTPCookieStorage and I probably figured out that I need to set the cookies from this native request manually to the storage for some reason.

That seems to be the case, I only got all tests to pass when I use both APIs side by side...seems dirty to me, but apple's SDKs are not always bug-free or well documented 🤷‍♂️

If everything looks good I'll add the proper documentation.

menelike avatar Jun 01 '21 12:06 menelike