Skip to content

Commit

Permalink
chore: Add shared cookies support for webview ios
Browse files Browse the repository at this point in the history
Pass through prop to support shared cookies on iOS.
  • Loading branch information
olegpesok committed Feb 27, 2025
1 parent 67183b6 commit 1884a96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/hv-web-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export default class HvWebView extends PureComponent<HvComponentProps> {
injectedJavaScript +=
'window.ReactNativeWebView.postMessage("hv-web-view:render-loading:false");';
}
const sharedCookiesEnabled = props['shared-cookies-enabled']
? props['shared-cookies-enabled'] === 'true'
: undefined;
const source = { html: props.html, uri: props.url } as const;
return (
<WebView
Expand All @@ -71,6 +74,7 @@ export default class HvWebView extends PureComponent<HvComponentProps> {
<></>
);
}}
sharedCookiesEnabled={sharedCookiesEnabled}
source={source}
startInLoadingState
/>
Expand Down

0 comments on commit 1884a96

Please sign in to comment.