<!--
{
  "documentType" : "article",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/webkit-for-appkit-and-uikit",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "WebKit for AppKit and UIKit"
}
-->

# WebKit for AppKit and UIKit

Display web content in AppKit or UIKit apps, or apps built with Objective-C.

## Overview

Present a [`WKWebView`](/documentation/WebKit/WKWebView) object from your custom view hierarchies and load the content you want to display. Use supporting objects to manage cookies, evaluate scripts, control navigation, generate snapshots, and perform text-based searches.

> Important:
> Always call WebKit functions and methods from your app’s main thread or main dispatch queue.

## Topics

### Web views

[Replacing UIWebView in your app](/documentation/WebKit/replacing-uiwebview-in-your-app)

Find a suitable alternative to handle your app’s web content.

[Viewing Desktop or Mobile Web Content Using a Web View](/documentation/WebKit/viewing-desktop-or-mobile-web-content-using-a-web-view)

Implement a simple iPad web browser that can view either the desktop or mobile version of a website.

[`WKWebView`](/documentation/WebKit/WKWebView)

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

[`WKUIDelegate`](/documentation/WebKit/WKUIDelegate)

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

### Web views

[Replacing UIWebView in your app](/documentation/WebKit/replacing-uiwebview-in-your-app)

Find a suitable alternative to handle your app’s web content.

[`WKWebView`](/documentation/WebKit/WKWebView)

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

[`WKUIDelegate`](/documentation/WebKit/WKUIDelegate)

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

### Web view configuration

[`WKWebViewConfiguration`](/documentation/WebKit/WKWebViewConfiguration)

A collection of properties that you use to initialize a web view.

[`WKWindowFeatures`](/documentation/WebKit/WKWindowFeatures)

Display-related attributes that a webpage requests for its window.

[`WKProcessPool`](/documentation/WebKit/WKProcessPool)

An opaque token that you use to run multiple web views in a single process.

[`WKPreferences`](/documentation/WebKit/WKPreferences)

An object that encapsulates the standard behaviors to apply to websites.

[`WKWebpagePreferences`](/documentation/WebKit/WKWebpagePreferences)

An object that specifies the behaviors to use when loading and rendering page content.

[`WKWebpagePreferences.ContentMode`](/documentation/WebKit/WKWebpagePreferences/ContentMode)

Constants that indicate how to render web view content.

[`WKWebpagePreferences.UpgradeToHTTPSPolicy`](/documentation/WebKit/WKWebpagePreferences/UpgradeToHTTPSPolicy)

[`WKSecurityRestrictionMode`](/documentation/WebKit/WKSecurityRestrictionMode)

[`WKPreferences.InactiveSchedulingPolicy`](/documentation/WebKit/WKPreferences/InactiveSchedulingPolicy-swift.enum)

An enumeration that lists policies for how a web view that’s not in a window handles tasks.

[`WKWebView.FullscreenState`](/documentation/WebKit/WKWebView/FullscreenState-swift.enum)

### Web data management

[`WKWebsiteDataStore`](/documentation/WebKit/WKWebsiteDataStore)

An object that manages cookies, disk and memory caches, and other types of data for a web view.

[`WKWebsiteDataRecord`](/documentation/WebKit/WKWebsiteDataRecord)

A record of the data that a particular website stores persistently.

[`WKHTTPCookieStore`](/documentation/WebKit/WKHTTPCookieStore)

An object that manages the HTTP cookies associated with a particular web view.

[`WKURLSchemeHandler`](/documentation/WebKit/WKURLSchemeHandler)

A protocol for loading resources with URL schemes that WebKit doesn’t handle.

[`WKURLSchemeTask`](/documentation/WebKit/WKURLSchemeTask)

An interface that WebKit uses to request custom resources from your app.

[`NSReadAccessURLDocumentOption`](/documentation/WebKit/NSReadAccessURLDocumentOption)

[`WKHTTPCookieStore.CookiePolicy`](/documentation/WebKit/WKHTTPCookieStore/CookiePolicy)

An enumeration with cases that indicate whether a cookie store allows cookie storage.

### Web data management

[`WKWebsiteDataStore`](/documentation/WebKit/WKWebsiteDataStore)

An object that manages cookies, disk and memory caches, and other types of data for a web view.

[`WKWebsiteDataRecord`](/documentation/WebKit/WKWebsiteDataRecord)

A record of the data that a particular website stores persistently.

[`WKHTTPCookieStore`](/documentation/WebKit/WKHTTPCookieStore)

An object that manages the HTTP cookies associated with a particular web view.

[`WKURLSchemeHandler`](/documentation/WebKit/WKURLSchemeHandler)

A protocol for loading resources with URL schemes that WebKit doesn’t handle.

[`WKURLSchemeTask`](/documentation/WebKit/WKURLSchemeTask)

An interface that WebKit uses to request custom resources from your app.

  <doc://com.apple.documentation/documentation/Foundation/NSAttributedString/DocumentReadingOptionKey/readAccessURL>

### Navigation

[`WKNavigationDelegate`](/documentation/WebKit/WKNavigationDelegate)

Methods for accepting or rejecting navigation changes, and for tracking the progress of navigation requests.

[`WKBackForwardList`](/documentation/WebKit/WKBackForwardList)

An object that manages the list of previously loaded webpages, which the web view uses for forward and backward navigation.

[`WKBackForwardListItem`](/documentation/WebKit/WKBackForwardListItem)

A representation of a webpage that the web view previously visited.

[`WKNavigation`](/documentation/WebKit/WKNavigation)

An object that tracks the loading progress of a webpage.

[`WKNavigationAction`](/documentation/WebKit/WKNavigationAction)

An object that contains information about an action that causes navigation to occur.

[`WKNavigationResponse`](/documentation/WebKit/WKNavigationResponse)

An object that contains the response to a navigation request, and which you use to make navigation-related policy decisions.

[`WKFormInfo`](/documentation/WebKit/WKFormInfo)

### Downloads

[`WKDownload`](/documentation/WebKit/WKDownload)

An object that represents the download of a web resource.

[`WKDownloadDelegate`](/documentation/WebKit/WKDownloadDelegate)

A protocol you implement to track download progress and handle redirects, authentication challenges, and failures.

[`WKDownload.PlaceholderPolicy`](/documentation/WebKit/WKDownload/PlaceholderPolicy)

### Page content

[`WKUserContentController`](/documentation/WebKit/WKUserContentController)

An object for managing interactions between JavaScript code and your web view, and for filtering content in your web view.

[`WKContentRuleListStore`](/documentation/WebKit/WKContentRuleListStore)

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

[`WKContentWorld`](/documentation/WebKit/WKContentWorld)

An object that defines a scope of execution for JavaScript code, and which you use to prevent conflicts between different scripts.

[`WKFrameInfo`](/documentation/WebKit/WKFrameInfo)

An object that contains information about a frame on a webpage.

[`WKSecurityOrigin`](/documentation/WebKit/WKSecurityOrigin)

An object that identifies the origin of a particular resource.

[`WKUserScript`](/documentation/WebKit/WKUserScript)

A script that the web view injects into a webpage.

[`WKContentWorld.Configuration`](/documentation/WebKit/WKContentWorld/Configuration)

[`WKJSHandle`](/documentation/WebKit/WKJSHandle)

A WKJSHandle object contains a reference to a JavaScript object.

### Page-level search

[`WKFindConfiguration`](/documentation/WebKit/WKFindConfiguration)

The configuration parameters to use when searching the contents of the web view.

[`WKFindResult`](/documentation/WebKit/WKFindResult)

An object that contains the results of searching the web view’s contents.

### Contextual menus

[`WKContextMenuElementInfo`](/documentation/WebKit/WKContextMenuElementInfo)

An object that contains information about a link the user clicked in a webpage, and which you use to configure a context menu for that link.

### Snapshots

[`WKSnapshotConfiguration`](/documentation/WebKit/WKSnapshotConfiguration)

The configuration data to use when generating an image from a web view’s contents.

[`WKPDFConfiguration`](/documentation/WebKit/WKPDFConfiguration)

The configuration data to use when generating a PDF representation of a web view’s contents.

### Web extensions

[`WKWebExtension`](/documentation/WebKit/WKWebExtension)

An object that encapsulates a web extension’s resources that the manifest file defines.

[`WKWebExtensionTab`](/documentation/WebKit/WKWebExtensionTab)

A protocol with methods that represent a tab to web extensions.

[`WKWebExtensionWindow`](/documentation/WebKit/WKWebExtensionWindow)

A protocol with methods that represent a window to web extensions.

[`WKWebExtensionContext`](/documentation/WebKit/WKWebExtensionContext)

An object that represents the runtime environment for a web extension.

[`WKWebExtensionController`](/documentation/WebKit/WKWebExtensionController)

An object that manages a set of loaded extension contexts.

[`WKWebExtensionControllerDelegate`](/documentation/WebKit/WKWebExtensionControllerDelegate)

A group of methods you use to customize web extension interactions.

[`WKWebExtension.Action`](/documentation/WebKit/WKWebExtension/Action)

An object that encapsulates the properties for an individual web extension action.

[`WKWebExtension.Command`](/documentation/WebKit/WKWebExtension/Command)

An object that encapsulates the properties for an individual web extension command.

[`WKWebExtension.MatchPattern`](/documentation/WebKit/WKWebExtension/MatchPattern)

An object that represents a way to specify groups of URLs.

[`WKWebExtension.MessagePort`](/documentation/WebKit/WKWebExtension/MessagePort)

An object that manages message-based communication with a web extension.

[`WKWebExtension.DataRecord`](/documentation/WebKit/WKWebExtension/DataRecord)

An object that represents a record of stored data for a specific web extension context.

[`WKWebExtension.TabConfiguration`](/documentation/WebKit/WKWebExtension/TabConfiguration)

An object that encapsulates configuration options for a tab in an extension.

[`WKWebExtension.WindowConfiguration`](/documentation/WebKit/WKWebExtension/WindowConfiguration)

An object that encapsulates configuration options for a window in an extension.

[`WKWebExtensionController.Configuration`](/documentation/WebKit/WKWebExtensionController/Configuration-swift.class)

A [`WKWebExtensionController.Configuration`](/documentation/WebKit/WKWebExtensionController/Configuration-swift.class) object with which to initialize a web extension controller.

### Errors

[`WKError.Code`](/documentation/WebKit/WKError/Code)

Possible error values that WebKit APIs can return.

[`WKError`](/documentation/WebKit/WKError)

Possible error values that WebKit APIs can return.

### Macros

[WebKit Macros](/documentation/WebKit/webkit-macros)

### Data types

[`NSAttributedStringCompletionHandler`](/documentation/WebKit/NSAttributedStringCompletionHandler)

### Immersive environments

[`WKImmersiveEnvironment`](/documentation/WebKit/WKImmersiveEnvironment)

[`WKImmersiveEnvironmentDelegate`](/documentation/WebKit/WKImmersiveEnvironmentDelegate)

[`allowsImmersiveEnvironments`](/documentation/WebKit/WKWebViewConfiguration/allowsImmersiveEnvironments)

[`immersiveEnvironmentDelegate`](/documentation/WebKit/WKWebView/immersiveEnvironmentDelegate)

[`dismissImmersiveEnvironment(completionHandler:)`](/documentation/WebKit/WKWebView/dismissImmersiveEnvironment(completionHandler:))

### Deprecated

Avoid using deprecated classes and protocols in your apps.

[Deprecated Symbols](/documentation/WebKit/deprecated-symbols)

Review unsupported symbols and their replacements.

### Web extension errors

[`WKWebExtension.Error.Code`](/documentation/WebKit/WKWebExtension/Error/Code)

Constants that indicate errors in the [`WKWebExtension`](/documentation/WebKit/WKWebExtension) domain.

[`WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/Code)

Constants that indicate errors in the [`WKWebExtensionContext`](/documentation/WebKit/WKWebExtensionContext) domain.

[`WKWebExtension.DataRecord.Error.Code`](/documentation/WebKit/WKWebExtension/DataRecord/Error/Code)

Constants that indicate errors in the [`WKWebExtension.DataRecord`](/documentation/WebKit/WKWebExtension/DataRecord) domain.

[`WKWebExtension.DataRecord.Error`](/documentation/WebKit/WKWebExtension/DataRecord/Error)

Constants that indicate errors in the [`WKWebExtension.DataRecord`](/documentation/WebKit/WKWebExtension/DataRecord) domain.

[`WKWebExtension.MatchPattern.Error.Code`](/documentation/WebKit/WKWebExtension/MatchPattern/Error/Code)

Constants that indicate errors in the [`WKWebExtension.MatchPattern`](/documentation/WebKit/WKWebExtension/MatchPattern) domain.

[`WKWebExtension.MessagePort.Error.Code`](/documentation/WebKit/WKWebExtension/MessagePort/Error/Code)

Constants that indicate errors in the [`WKWebExtension.MessagePort`](/documentation/WebKit/WKWebExtension/MessagePort) domain.

[`WKWebExtension.MessagePort.Error`](/documentation/WebKit/WKWebExtension/MessagePort/Error)

Constants that indicate errors in the [`WKWebExtension.MessagePort`](/documentation/WebKit/WKWebExtension/MessagePort) domain.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)