创build一个非跟踪的应用内网页浏览器

我正在尝试创build一个webview(作为练习),它不会在本地跟踪或存储任何浏览历史logging。
我已经做到了,当webview被closures时,它会调用以下内容

[[NSURLSession sharedSession]resetWithCompletionHandler:^{}]; 

但我发现像谷歌search历史的东西坚持一些如何之间的会议。 我也尝试通过分开清除cookie

 NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (NSHTTPCookie *cookie in [storage cookies]) { [storage deleteCookie:cookie]; } [[NSUserDefaults standardUserDefaults] synchronize]; 

依然无济于事。 Googlesearch仍会在创build新网页视图时显示。
有谁知道一种方法来删除标识符,谷歌正在使用匹配的search历史回到我? 我担心它就像包标识符,这可能是有点棘手,以防止被阅读。
任何想法都表示赞赏。
问候,
卢克

尝试为WKWebViewConfigurationWKWebsiteDataStore设置nonPersistentDataStore

这是一个示例代码片段

 let webVuConfiguration = WKWebViewConfiguration() webVuConfiguration.websiteDataStore =WKWebsiteDataStore.nonPersistentDataStore() let webView = WKWebView(frame: webviewRect, configuration: webVuConfiguration) 

恭维Durai Amuthan.H的回答,这里是我们的答案谁仍然喜欢使用Obj-C

 WKWebViewConfiguration * config = [WKWebViewConfiguration new]; config.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore]; webView = [[WKWebView alloc]initWithFrame:viewFrame configuration:config];