RESOLVED FIXED147635
WKWebsiteDataStore does not always clear cookies
https://bugs.webkit.org/show_bug.cgi?id=147635
Summary WKWebsiteDataStore does not always clear cookies
Shreyas VA
Reported 2015-08-04 11:08:59 PDT
WKWebsiteDataStore does not clear cookies in the following scenarios: 1) WKWebView has been just created 2) There is no WKWebView attached to the WKWebViewConfiguration (there maybe more scenarios, these are the known ones) Sample code to run: WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc] init]; self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:config]; [self.view addSubview:self.webView]; NSString* url = @"http://google.com"; [self.webView loadRequest: [NSURLRequest requestWithURL:[NSURL URLWithString:url]]]; // Trigger clearing of cookies. [self.webView.configuration.websiteDataStore removeDataOfTypes:[NSSet setWithObject:WKWebsiteDataTypeCookies] modifiedSince:[NSDate distantPast] completionHandler:^{ // Notice that this is not called. NSLog(@"Cleared cookies"); }]; Expected Results: The completion handler is called and cookies are cleared. Actual Results: The completion handler is not called and cookies are not cleared.
Attachments
Shreyas VA
Comment 1 2015-08-04 11:09:16 PDT
Anders Carlsson
Comment 2 2015-08-05 10:18:32 PDT
I can't reproduce this, can you please attach a test app that shows the problem?
Shreyas VA
Comment 3 2015-08-05 10:37:24 PDT
Reproducibility on simulator 0/5 Reproducibility on device 5/5 Or in other words this bug only affects device builds.
Shreyas VA
Comment 4 2015-08-10 17:55:31 PDT
I can't repro this bug anymore. Please note that this is different from bug 147333. This bug also states that the completionHandler is not called.
Note You need to log in before you can comment on or make changes to this bug.