1
<WebView
        incognito={true}
        javaScriptEnabled={true}
        thirdPartyCookiesEnabled={true}
        sharedCookiesEnabled={true}
        
        source={{
          uri: url,
          headers: {
            cookie: cookie
          },
        }}

        onLoadStart={() => {
          props.navigation.setParams({
            title: props.title,
          });
        }}
        onLoadEnd={() => setSpinner(false)}
      />

i tried adding cookie manager library but it does not work. Although same code works fine for iOS but in android it doesn't detect cookie.

Also, tried on different android version but the problem is persistent.

This issue started after upgrading ReactNative version from 63 to 71.

1 Answers1

0

There have been changes in the WebView component in React Native 0.70 which may affect cookie handling.

You can try using the CookieManager from the react-native-cookies library to manage cookies in Android.

Make sure to follow the installation and usage instructions from the library’s documentation. Additionally, you can try setting mixedContentMode prop to always on the WebView component to allow mixed content (HTTP and HTTPS) to access cookies.