A WKPreferences object encapsulates the preference settings for a web view.


class WKPreferences : NSObject


The preferences object associated with a web view is specified by its web view configuration.


Setting Rendering Preferences

Setting Java and JavaScript Preferences

var javaEnabled: Bool

A Boolean value indicating whether Java is enabled.

var javaScriptCanOpenWindowsAutomatically: Bool

A Boolean value indicating whether JavaScript can open windows without user interaction.

var javaScriptEnabled: Bool

A Boolean value indicating whether JavaScript is enabled.

var plugInsEnabled: Bool

A Boolean value indicating whether plug-ins are enabled.

Instance Properties


Inherits From

See Also


protocol WKNavigationDelegate

The methods of the WKNavigationDelegate protocol help you implement custom behaviors that are triggered during a web view's process of accepting, loading, and completing a navigation request.

class WKProcessPool

A WKProcessPool object represents a pool of Web Content processes.

class WKWindowFeatures

A WKWindowFeatures object specifies optional attributes for the containing window when a new web view is requested.

class WKWebView

An object that displays interactive web content, such as for an in-app browser.

class WKWebViewConfiguration

A collection of properties used to initialize a web view.

protocol WKUIDelegate

The WKUIDelegate class provides methods for presenting native user interface elements on behalf of a webpage.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software