Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: adds setCookie/deleteCookie #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

menelike
Copy link

@menelike menelike commented Jun 1, 2021

…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()

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

closes #13

…es from the clients.

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

Fixes: Callback not being called on clearCookies
src/ios/WebviewProxy.m Outdated Show resolved Hide resolved
src/ios/WebviewProxy.m Outdated Show resolved Hide resolved
@menelike
Copy link
Author

menelike commented Jun 1, 2021

@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
Copy link
Author

menelike commented Jun 1, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Be able to set cookies on the client
2 participants