mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 03:31:05 +00:00
fix(iOS): restore cookie handling for iOS <= 10 (#1728)
This commit is contained in:
+3
-3
@@ -282,7 +282,7 @@ static NSDictionary* customCertificatesForHost;
|
||||
_webView.scrollView.scrollEnabled = _scrollEnabled;
|
||||
_webView.scrollView.pagingEnabled = _pagingEnabled;
|
||||
//For UIRefreshControl to work correctly, the bounces should always be true
|
||||
_webView.scrollView.bounces = _pullToRefreshEnabled || _bounces;
|
||||
_webView.scrollView.bounces = _pullToRefreshEnabled || _bounces;
|
||||
_webView.scrollView.showsHorizontalScrollIndicator = _showsHorizontalScrollIndicator;
|
||||
_webView.scrollView.showsVerticalScrollIndicator = _showsVerticalScrollIndicator;
|
||||
_webView.scrollView.directionalLockEnabled = _directionalLockEnabled;
|
||||
@@ -1155,7 +1155,7 @@ static NSDictionary* customCertificatesForHost;
|
||||
- (void)setPullToRefreshEnabled:(BOOL)pullToRefreshEnabled
|
||||
{
|
||||
_pullToRefreshEnabled = pullToRefreshEnabled;
|
||||
|
||||
|
||||
if (pullToRefreshEnabled) {
|
||||
[self addPullToRefreshControl];
|
||||
} else {
|
||||
@@ -1356,7 +1356,7 @@ static NSDictionary* customCertificatesForHost;
|
||||
if (_sharedCookiesEnabled) {
|
||||
if (@available(iOS 11.0, *)) {
|
||||
// see WKWebView initialization for added cookies
|
||||
} else {
|
||||
} else if (request != nil) {
|
||||
NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:request.URL];
|
||||
NSDictionary<NSString *, NSString *> *cookieHeader = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies];
|
||||
NSMutableURLRequest *mutableRequest = [request mutableCopy];
|
||||
|
||||
Reference in New Issue
Block a user