File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -118,10 +118,19 @@ - (void)windowDidLoad
118118 messageTextField.stringValue = @" " ;
119119 }
120120
121+ WKWebViewConfiguration *config = [[[WKWebViewConfiguration alloc ] init ] autorelease ];
122+
123+ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
124+ if (AVAILABLE_MAC_OS(10 , 11 )) {
125+ // Don't leave stale files in user's Library
126+ config.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore ];
127+ }
128+ #endif
129+
121130 // Construct a web view at runtime instead of relying on using the xib because this is
122131 // more backwards compatible as we can use runtime checks and compiler defines.
123132 _webView = [[WKWebView alloc ] initWithFrame: NSZeroRect
124- configuration: [[[ WKWebViewConfiguration alloc ] init ] autorelease ] ];
133+ configuration: config ];
125134
126135 [webViewContainer addSubview: _webView];
127136 _webView.frame = webViewContainer.bounds;
You can’t perform that action at this time.
0 commit comments