---
title: hasAccessToPrivateData
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkwebextensioncontext/hasaccesstoprivatedata
---

# hasAccessToPrivateData

A Boolean value indicating if the extension has access to private data.

## Declaration

```swift
var hasAccessToPrivateData: Bool { get set }
```

## Discussion

Discussion If this property is true, the extension is granted permission to interact with private windows, tabs, and cookies. Access to private data should be explicitly allowed by the user before setting this property. This value should be saved and restored as needed by the app. note: To ensure proper isolation between private and non-private data, web views associated with private data must use a different WKUserContentController. Likewise, to be identified as a private web view and to ensure that cookies and other website data is not shared, private web views must be configured to use a non-persistent WKWebsiteDataStore.
