diff --git a/src/ios/WebviewProxy.m b/src/ios/WebviewProxy.m index 6c41eb8..e412ffb 100644 --- a/src/ios/WebviewProxy.m +++ b/src/ios/WebviewProxy.m @@ -29,8 +29,8 @@ - (BOOL) overrideSchemeTask: (id )urlSchemeTask { // Request should be handled by this plugin if the url contains the proxy path if ([stringToLoad hasPrefix:@"/_http_proxy_"]||[stringToLoad hasPrefix:@"/_https_proxy_"]) { - // Firt sync all cookies from the WKHTTPCookieStore to the NSHTTPCookieStorage.. - // .. to solve make cookies set in the main or IAB webview available for proxy requests + // First sync all cookies from the WKHTTPCookieStore to the NSHTTPCookieStorage.. + // .. to make cookies from main or IAB webview available for proxy requests WKWebsiteDataStore* dataStore = [WKWebsiteDataStore defaultDataStore]; WKHTTPCookieStore* cookieStore = dataStore.httpCookieStore; [cookieStore getAllCookies:^(NSArray* cookies) { @@ -71,7 +71,7 @@ - (BOOL) overrideSchemeTask: (id )urlSchemeTask { } } - // Copy cookies from the native requests cookie storage to the webviews cookie storage + // Copy cookies from the native requests cookie storage to other cookie storage to make them available to the webviews NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response; if(httpResponse) { NSArray* cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[httpResponse allHeaderFields] forURL:response.URL];