|
@@ -1190,6 +1190,13 @@ static NSDictionary* customCertificatesForHost;
|
1190
|
1190
|
for (NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {
|
1191
|
1191
|
[wkWebViewConfig.websiteDataStore.httpCookieStore setCookie:cookie completionHandler:nil];
|
1192
|
1192
|
}
|
|
1193
|
+
|
|
1194
|
+ // Write all cookies from WKWebView back to sharedHTTPCookieStorage
|
|
1195
|
+ [wkWebViewConfig.websiteDataStore.httpCookieStore getAllCookies:^(NSArray* cookies) {
|
|
1196
|
+ for (NSHTTPCookie *cookie in cookies) {
|
|
1197
|
+ [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:cookie];
|
|
1198
|
+ }
|
|
1199
|
+ }];
|
1193
|
1200
|
} else {
|
1194
|
1201
|
NSMutableString *script = [NSMutableString string];
|
1195
|
1202
|
|