---
title: WKContentRuleListStore
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkcontentruleliststore
---

# WKContentRuleListStore

An object that contains the rules for how to load and filter content in the web view.

## Declaration

```swift
@MainActor class WKContentRuleListStore
```

## Overview

Overview Use a WKContentRuleListStore to compile and manage rules for filtering content in a web view. Rule lists act as content blockers inside your app. You use them to prevent the web view from loading specific content, either based on the original location of that content or other criteria you specify. For example, a corporate app might use rules to prevent the web view from loading content that originates from outside the corporate network. Fetch the default WKContentRuleListStore object or create a custom store object and use it to compile or access the available rules. Each store object stores its existing rules persistently in the file system and loads those rules at creation time. A store object doesn’t automatically apply any of its rules to a particular web view. To apply a rule to a web view, add it to the WKUserContentController object of the web view’s configuration object.

## Topics

### Creating a Content Rule List Store

- [default()](webkit/wkcontentruleliststore/default().md)
- [init(url:)](webkit/wkcontentruleliststore/init(url:)-dile.md)

### Creating and Deleting Content Rule Lists

- [compileContentRuleList(forIdentifier:encodedContentRuleList:completionHandler:)](webkit/wkcontentruleliststore/compilecontentrulelist(foridentifier:encodedcontentrulelist:completionhandler:).md)
- [removeContentRuleList(forIdentifier:completionHandler:)](webkit/wkcontentruleliststore/removecontentrulelist(foridentifier:completionhandler:).md)

### Accessing the Current Rule Lists

- [getAvailableContentRuleListIdentifiers(_:)](webkit/wkcontentruleliststore/getavailablecontentrulelistidentifiers(_:).md)
- [lookUpContentRuleList(forIdentifier:completionHandler:)](webkit/wkcontentruleliststore/lookupcontentrulelist(foridentifier:completionhandler:).md)

### Initializers

- [init(URL:)](webkit/wkcontentruleliststore/init(url:)-7emmv.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Page content

- [WKUserContentController](webkit/wkusercontentcontroller.md)
- [WKContentWorld](webkit/wkcontentworld.md)
- [WKFrameInfo](webkit/wkframeinfo.md)
- [WKSecurityOrigin](webkit/wksecurityorigin.md)
- [WKUserScript](webkit/wkuserscript.md)
