feat(iOS cookies): implement sharedCookiesEnabled prop for iOS RNCWKWebView (#175)

We had the problem on iOS WebViews that local cookies (stored in local HTTPCookieStorage, set with  [react-native-cookie](https://github.com/shimohq/react-native-cookie) ) were not added in loadRequests. On Android the local stored cookies were sent like expected.
This kinda "hacky" solution is the only way we found, that works for us.
The stack overview link is in the code below.
If someone finds a better solution we would very much like to accept that.
This commit is contained in:
SebiVPS
2019-04-15 10:19:10 +02:00
committed by Thibault Malbranche
parent a9c00faf37
commit cdbfc19cd2
5 changed files with 138 additions and 32 deletions
+8
View File
@@ -387,12 +387,20 @@ export interface IOSWebViewProps extends WebViewSharedProps {
*/
allowsLinkPreview?: boolean;
/**
* Set true if shared cookies from HTTPCookieStorage should used for every load request in the
* `RNCWKWebView`. The default value is `false`.
* @platform ios
*/
sharedCookiesEnabled?: boolean;
/**
* A Boolean value that determines whether scrolling is disabled in a particular direction.
* The default value is `true`.
* @platform ios
*/
directionalLockEnabled?: boolean;
}
export interface AndroidWebViewProps extends WebViewSharedProps {