소스 검색

add WKWebsiteDataStore.nonPersistent in webView

marinofaggiana 5 년 전
부모
커밋
d21d152778
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      iOSClient/Library/SwiftWebVC/SwiftWebVC.swift

+ 3 - 1
iOSClient/Library/SwiftWebVC/SwiftWebVC.swift

@@ -70,7 +70,9 @@ public class SwiftWebVC: UIViewController {
     
     
     lazy var webView: WKWebView = {
-        var tempWebView = WKWebView(frame: UIScreen.main.bounds)
+        let config = WKWebViewConfiguration()
+        config.websiteDataStore = WKWebsiteDataStore.nonPersistent()
+        var tempWebView = WKWebView(frame: UIScreen.main.bounds, configuration: config)
         tempWebView.uiDelegate = self
         tempWebView.navigationDelegate = self
         return tempWebView;