Skip to content

feat(ios-common-cookies): add clearAllCookies function#5

Draft
alejandroruizponce wants to merge 1 commit intomainfrom
alejandroruiz/add-clearCookies-to-iOSCookieCommon
Draft

feat(ios-common-cookies): add clearAllCookies function#5
alejandroruizponce wants to merge 1 commit intomainfrom
alejandroruiz/add-clearCookies-to-iOSCookieCommon

Conversation

@alejandroruizponce
Copy link
Contributor

Hi there! 👋

This pull request adds a new feature to the iOS Common Cookies module, allowing all cookies to be cleared from both HTTPCookieStorage and the WKWebView cookie store. The most important changes include the implementation of the new clearAllCookies method in both the native Swift module and the TypeScript interface, as well as the introduction of a new result type for this operation.

New Feature: Cookie Clearing

  • Added a new async function clearAllCookies to the iOSCommonCookiesModule Swift class, which clears all cookies from HTTPCookieStorage and the WKWebView cookie store, and returns the number of cookies cleared from each.
  • Added the clearAllCookies() method to the TypeScript interface in iOSCommonCookies.ts, returning a Promise<CookieClearResult>.
  • Introduced a new CookieClearResult type in iOSCommonCookies.types.ts to represent the result of the cookie clearing operation, including counts for both stores.

TypeScript Typings Update

  • Updated the import statement in iOSCommonCookies.ts to include the new CookieClearResult type.

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.

1 participant