fix(iOS): restore cookie handling for iOS <= 10 (#1728)
This commit is contained in:
parent
816c4a4038
commit
d338cae57a
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue