WebViewPlatformConfig

Android platform configuration.

Platform-specific WebView configuration.

The actual shape depends on the current target:

  • Android: no platform-specific options.

  • iOS: WebKit website data store selection.

  • JVM: Windows, Linux, and macOS native backend settings.

actual data class WebViewPlatformConfig

iOS-specific WKWebView configuration.

actual data class WebViewPlatformConfig

JVM desktop WebView configuration.

The JVM artifact contains settings for all desktop backends. At runtime, only the setting matching the current operating system is passed to native code.

Constructors

Link copied to clipboard
constructor(profile: Profile? = null)
constructor(websiteDataStore: WebsiteDataStore = WebsiteDataStore.DEFAULT)
constructor(windowSetting: WebViewPlatformConfig.Windows = Windows(), linuxSetting: WebViewPlatformConfig.Linux = Linux(), macOSSetting: WebViewPlatformConfig.MacOS = MacOS())

Types

Link copied to clipboard
data class Linux(val dataDir: String = System.getProperty("java.io.tmpdir") + File.separator + "wvbridge" + File.separator + "data", val cacheDir: String = System.getProperty("java.io.tmpdir") + File.separator + "wvbridge" + File.separator + "cache")

Linux WebKitGTK-specific settings for JVM desktop.

Link copied to clipboard
data class MacOS(val websiteDataStore: WebViewPlatformConfig.MacOS.WebsiteDataStore = WebsiteDataStore.DEFAULT)

macOS WKWebView-specific settings for JVM desktop.

Link copied to clipboard
data class Windows(val dataDir: String = System.getProperty("java.io.tmpdir") + File.separator + "wvbridge")

Windows WebView2-specific settings for JVM desktop.

Properties

Link copied to clipboard

Settings used by the Linux WebKitGTK backend.

Link copied to clipboard

Settings used by the macOS WKWebView backend.

Link copied to clipboard
val profile: Profile?

Optional AndroidX WebKit Profile to attach to the created WebView. Use this when a WebView needs isolated website data, such as cookies, DOM storage, permissions, service workers, and cache.

Link copied to clipboard

Controls whether WebKit uses the default persistent website data store or a non-persistent one.

Link copied to clipboard

Settings used by the Windows WebView2 backend.