Commit f2ba3ac
authored
feat(ios-common-cookies): add clearAllCookies function
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.1 parent 6101a58 commit f2ba3ac
File tree
3 files changed
+43
-1
lines changed- packages/public/ios-common-cookies
- ios
- src
3 files changed
+43
-1
lines changedLines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
48 | 82 | | |
49 | 83 | | |
50 | 84 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments