One Logo Pool Ball
WebKit · IOS API REFERENCE

WebPage.Configuration

struct · iOS 26.0+ · SDK 27.1

@MainActor struct Configuration

A configuration type that specifies the preferences and behaviors of a webpage.

Members (37)

get · iOS 26.0+

websiteDataStore

TypeScript
get websiteDataStore(): Promise<WKWebsiteDataStore>
Swift declaration
@MainActor var websiteDataStore: WKWebsiteDataStore

The object you use to get and set the site’s cookies and to track the cached data objects. To create a private web-browsing session, create a non-persistent data store using the `nonPersistent()` method and assign it to this property. For more information, see `WKWebsiteDataStore`.

set · iOS 26.0+

websiteDataStore

TypeScript
setWebsiteDataStore(value: WKWebsiteDataStore): Promise<void>
Swift declaration
@MainActor var websiteDataStore: WKWebsiteDataStore

The object you use to get and set the site’s cookies and to track the cached data objects. To create a private web-browsing session, create a non-persistent data store using the `nonPersistent()` method and assign it to this property. For more information, see `WKWebsiteDataStore`.

get · iOS 26.0+

dataDetectorTypes

TypeScript
get dataDetectorTypes(): Promise<WKDataDetectorTypes>
Swift declaration
@MainActor var dataDetectorTypes: WKDataDetectorTypes

The types of data detectors to apply to the webpage's content. Data detectors add interactivity to web content by creating links for specially formatted text. For example, the `.link` type causes the apple.com portion of the text “Visit apple.com” to become a link to the Apple website. The default value of this property is an empty OptionSet.

set · iOS 26.0+

dataDetectorTypes

TypeScript
setDataDetectorTypes(value: WKDataDetectorTypes): Promise<void>
Swift declaration
@MainActor var dataDetectorTypes: WKDataDetectorTypes

The types of data detectors to apply to the webpage's content. Data detectors add interactivity to web content by creating links for specially formatted text. For example, the `.link` type causes the apple.com portion of the text “Visit apple.com” to become a link to the Apple website. The default value of this property is an empty OptionSet.

get · iOS 26.0+

loadsSubresources

TypeScript
get loadsSubresources(): Promise<boolean>
Swift declaration
@MainActor var loadsSubresources: Bool

Indicates whether the webpage loads all of its subresources in addition to the main resource. The default value of this property is `true`.

set · iOS 26.0+

loadsSubresources

TypeScript
setLoadsSubresources(value: boolean): Promise<void>
Swift declaration
@MainActor var loadsSubresources: Bool

Indicates whether the webpage loads all of its subresources in addition to the main resource. The default value of this property is `true`.

get · iOS 26.0+

urlSchemeHandlers

TypeScript
get urlSchemeHandlers(): Promise<NativeMap<URLScheme, SDKHandle>>
Swift declaration
@MainActor var urlSchemeHandlers: [URLScheme : any URLSchemeHandler]

Allows registering an object to load resources associated with a specified URL scheme.

set · iOS 26.0+

urlSchemeHandlers

TypeScript
setUrlSchemeHandlers(value: NativeMap<URLScheme, SDKHandle>): Promise<void>
Swift declaration
@MainActor var urlSchemeHandlers: [URLScheme : any URLSchemeHandler]

Allows registering an object to load resources associated with a specified URL scheme.

get · iOS 26.0+

mediaPlaybackBehavior

TypeScript
get mediaPlaybackBehavior(): Promise<WebPage_Configuration_MediaPlaybackBehavior>
Swift declaration
@MainActor var mediaPlaybackBehavior: WebPage.Configuration.MediaPlaybackBehavior

Indicates whether HTML5 videos play inline or use the native full-screen controller.

set · iOS 26.0+

mediaPlaybackBehavior

TypeScript
setMediaPlaybackBehavior(value: WebPage_Configuration_MediaPlaybackBehavior): Promise<void>
Swift declaration
@MainActor var mediaPlaybackBehavior: WebPage.Configuration.MediaPlaybackBehavior

Indicates whether HTML5 videos play inline or use the native full-screen controller.

get · iOS 26.0+

userContentController

TypeScript
get userContentController(): Promise<WKUserContentController>
Swift declaration
@MainActor var userContentController: WKUserContentController

The object that coordinates interactions between your app’s native code and the webpage’s scripts and other content.

set · iOS 26.0+

userContentController

TypeScript
setUserContentController(value: WKUserContentController): Promise<void>
Swift declaration
@MainActor var userContentController: WKUserContentController

The object that coordinates interactions between your app’s native code and the webpage’s scripts and other content.

get · iOS 26.0+

webExtensionController

TypeScript
get webExtensionController(): Promise<(WKWebExtensionController) | null>
Swift declaration
@MainActor var webExtensionController: WKWebExtensionController?

The web extension controller to associate with the webpage.

set · iOS 26.0+

webExtensionController

TypeScript
setWebExtensionController(value?: (WKWebExtensionController) | null): Promise<void>
Swift declaration
@MainActor var webExtensionController: WKWebExtensionController?

The web extension controller to associate with the webpage.

get · iOS 26.0+

allowsInlinePredictions

TypeScript
get allowsInlinePredictions(): Promise<boolean>
Swift declaration
@MainActor var allowsInlinePredictions: Bool

Indicates whether inline predictions are allowed. The default value is `false`. If false, inline predictions are disabled regardless of the system setting. If true, they are enabled based on the system setting.

set · iOS 26.0+

allowsInlinePredictions

TypeScript
setAllowsInlinePredictions(value: boolean): Promise<void>
Swift declaration
@MainActor var allowsInlinePredictions: Bool

Indicates whether inline predictions are allowed. The default value is `false`. If false, inline predictions are disabled regardless of the system setting. If true, they are enabled based on the system setting.

get · iOS 26.0+

upgradeKnownHostsToHTTPS

TypeScript
get upgradeKnownHostsToHTTPS(): Promise<boolean>
Swift declaration
@MainActor var upgradeKnownHostsToHTTPS: Bool

Indicates whether the web view should automatically upgrade supported HTTP requests to HTTPS. The default value of this property is `true`.

set · iOS 26.0+

upgradeKnownHostsToHTTPS

TypeScript
setUpgradeKnownHostsToHTTPS(value: boolean): Promise<void>
Swift declaration
@MainActor var upgradeKnownHostsToHTTPS: Bool

Indicates whether the web view should automatically upgrade supported HTTP requests to HTTPS. The default value of this property is `true`.

get · iOS 26.0+

deviceSensorAuthorization

TypeScript
get deviceSensorAuthorization(): Promise<WebPage_DeviceSensorAuthorization>
Swift declaration
@MainActor var deviceSensorAuthorization: WebPage.DeviceSensorAuthorization

Allows specifying how web resources may access device sensors. The default implementation returns `WKPermissionDecision.prompt` for all requests.

set · iOS 26.0+

deviceSensorAuthorization

TypeScript
setDeviceSensorAuthorization(value: WebPage_DeviceSensorAuthorization): Promise<void>
Swift declaration
@MainActor var deviceSensorAuthorization: WebPage.DeviceSensorAuthorization

Allows specifying how web resources may access device sensors. The default implementation returns `WKPermissionDecision.prompt` for all requests.

get · iOS 26.0+

ignoresViewportScaleLimits

TypeScript
get ignoresViewportScaleLimits(): Promise<boolean>
Swift declaration
@MainActor var ignoresViewportScaleLimits: Bool

Determines whether a webpage allows scaling of the webpage. When set to `true`, this property overrides the user-scalable HTML property in a webpage, and lets the webpage scale its view's content regardless of the author’s intent. The default value of this property is `false`.

set · iOS 26.0+

ignoresViewportScaleLimits

TypeScript
setIgnoresViewportScaleLimits(value: boolean): Promise<void>
Swift declaration
@MainActor var ignoresViewportScaleLimits: Bool

Determines whether a webpage allows scaling of the webpage. When set to `true`, this property overrides the user-scalable HTML property in a webpage, and lets the webpage scale its view's content regardless of the author’s intent. The default value of this property is `false`.

get · iOS 26.0+

supportsAdaptiveImageGlyph

TypeScript
get supportsAdaptiveImageGlyph(): Promise<boolean>
Swift declaration
@MainActor var supportsAdaptiveImageGlyph: Bool

Indicates whether insertion of adaptive image glyphs is allowed. The default value is `false`. If `false`, adaptive image glyphs are inserted as regular images. If `true`, they are inserted with the full adaptive sizing behavior.

set · iOS 26.0+

supportsAdaptiveImageGlyph

TypeScript
setSupportsAdaptiveImageGlyph(value: boolean): Promise<void>
Swift declaration
@MainActor var supportsAdaptiveImageGlyph: Bool

Indicates whether insertion of adaptive image glyphs is allowed. The default value is `false`. If `false`, adaptive image glyphs are inserted as regular images. If `true`, they are inserted with the full adaptive sizing behavior.

get · iOS 26.0+

applicationNameForUserAgent

TypeScript
get applicationNameForUserAgent(): Promise<(string) | null>
Swift declaration
@MainActor var applicationNameForUserAgent: String?

The app name that appears in the user agent string.

set · iOS 26.0+

applicationNameForUserAgent

TypeScript
setApplicationNameForUserAgent(value?: (string) | null): Promise<void>
Swift declaration
@MainActor var applicationNameForUserAgent: String?

The app name that appears in the user agent string.

get · iOS 26.0+

defaultNavigationPreferences

TypeScript
get defaultNavigationPreferences(): Promise<WebPage_NavigationPreferences>
Swift declaration
@MainActor var defaultNavigationPreferences: WebPage.NavigationPreferences

The default preferences to use when loading and rendering content. Use this property to specify the JavaScript settings and content mode for new navigations. When the webpage navigates to a new resource, it passes the default preferences to its navigation decider, which can modify the preferences if desired.

set · iOS 26.0+

defaultNavigationPreferences

TypeScript
setDefaultNavigationPreferences(value: WebPage_NavigationPreferences): Promise<void>
Swift declaration
@MainActor var defaultNavigationPreferences: WebPage.NavigationPreferences

The default preferences to use when loading and rendering content. Use this property to specify the JavaScript settings and content mode for new navigations. When the webpage navigates to a new resource, it passes the default preferences to its navigation decider, which can modify the preferences if desired.

get · iOS 26.0+

allowsAirPlayForMediaPlayback

TypeScript
get allowsAirPlayForMediaPlayback(): Promise<boolean>
Swift declaration
@MainActor var allowsAirPlayForMediaPlayback: Bool

Indicates whether the webpage allows media playback over AirPlay. The default value of this property is `true`.

set · iOS 26.0+

allowsAirPlayForMediaPlayback

TypeScript
setAllowsAirPlayForMediaPlayback(value: boolean): Promise<void>
Swift declaration
@MainActor var allowsAirPlayForMediaPlayback: Bool

Indicates whether the webpage allows media playback over AirPlay. The default value of this property is `true`.

get · iOS 26.0+

suppressesIncrementalRendering

TypeScript
get suppressesIncrementalRendering(): Promise<boolean>
Swift declaration
@MainActor var suppressesIncrementalRendering: Bool

Indicates whether the web view suppresses content rendering until the content is fully loaded into memory. The default value of this property is `false`.

set · iOS 26.0+

suppressesIncrementalRendering

TypeScript
setSuppressesIncrementalRendering(value: boolean): Promise<void>
Swift declaration
@MainActor var suppressesIncrementalRendering: Bool

Indicates whether the web view suppresses content rendering until the content is fully loaded into memory. The default value of this property is `false`.

get · iOS 26.0+

showsSystemScreenTimeBlockingView

TypeScript
get showsSystemScreenTimeBlockingView(): Promise<boolean>
Swift declaration
@MainActor var showsSystemScreenTimeBlockingView: Bool { get set }

Indicates whether the webpage should use the system Screen Time blocking view. The default value is `true`. If `true`, the system Screen Time blocking view is shown when blocked by Screen Time. If `false`, a blurred view of the web content is shown instead.

set · iOS 26.0+

showsSystemScreenTimeBlockingView

TypeScript
setShowsSystemScreenTimeBlockingView(value: boolean): Promise<void>
Swift declaration
@MainActor var showsSystemScreenTimeBlockingView: Bool { get set }

Indicates whether the webpage should use the system Screen Time blocking view. The default value is `true`. If `true`, the system Screen Time blocking view is shown when blocked by Screen Time. If `false`, a blurred view of the web content is shown instead.

get · iOS 26.0+

limitsNavigationsToAppBoundDomains

TypeScript
get limitsNavigationsToAppBoundDomains(): Promise<boolean>
Swift declaration
@MainActor var limitsNavigationsToAppBoundDomains: Bool

Indicates whether the web view limits navigation to pages within the app’s domain. The default value of this property is `false`.

set · iOS 26.0+

limitsNavigationsToAppBoundDomains

TypeScript
setLimitsNavigationsToAppBoundDomains(value: boolean): Promise<void>
Swift declaration
@MainActor var limitsNavigationsToAppBoundDomains: Bool

Indicates whether the web view limits navigation to pages within the app’s domain. The default value of this property is `false`.

init · iOS 26.0+

init

TypeScript
static init(): Promise<WebPage_Configuration>
Swift declaration
@MainActor init()

Creates a new configuration value.

Skipped declarations

No declarations were skipped in this snapshot.

All WebKit types →