WKContentRuleListStore
An object that contains the rules for how to load and filter content in the web view.
Declaration
@MainActor class WKContentRuleListStoreOverview
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
Creating and Deleting Content Rule Lists
compileContentRuleList(forIdentifier:encodedContentRuleList:completionHandler:)removeContentRuleList(forIdentifier:completionHandler:)