One Logo Pool Ball
BrowserEngineKit · IOS API REFERENCE

WebContentProcess

struct · iOS 17.4+ · SDK 27.1

struct WebContentProcess

An object that represents a running web content extension process. The system guarantees that the web content extension process has launched by the time any init methods return. If the web content extension process exits, the system calls ``onInterruption``. There can multiple web content process per host browser. Each time this type is initialized, a new extension process will be launched.

Members (6)

method · iOS 17.4+

invalidate

TypeScript
invalidate(): void
Swift declaration
func invalidate()

Stops the extension process. When you call this method, you tell the system your app no longer needs this extension process. The system will terminate the extension process.

method · iOS 17.6+

grantCapability

TypeScript
grantCapabilityInvalidationHandler(capability: ProcessCapability, invalidationHandler: (() => void)): ProcessCapability_Grant
Swift declaration
func grantCapability(_ capability: ProcessCapability, invalidationHandler: @escaping () -> Void) throws -> ProcessCapability.Grant
method · iOS 17.4+

grantCapability

TypeScript
grantCapability(capability: ProcessCapability): ProcessCapability_Grant
Swift declaration
func grantCapability(_ capability: ProcessCapability) throws -> ProcessCapability.Grant

Grants the specified capability to the process. This method grants the specified capability to the process or throws an error if it can not be granted. - Parameters: - capability: The capability to be granted - Returns: an invalidatable `Grant` object that represents the granted capability.

init · iOS 17.4+

init

TypeScript
static init(bundleIdentifier: (string) | null, onInterruption: (() => void)): Promise<WebContentProcess>
Swift declaration
init(bundleIdentifier: String? = nil, onInterruption: @escaping () -> Void) async throws

Asynchronously launches a web content process This initializer launches a new web content extension process. - Parameters: - `onInterruption` : A closure that is called if the helper process terminates.

method · iOS 17.4+

makeLibXPCConnection

TypeScript
makeLibXPCConnection(): SDKHandle
Swift declaration
func makeLibXPCConnection() throws -> xpc_connection_t

Creates a new libXPC connection to the extension process. This method creates a connection to the extension process and returns it. - Returns: The connection object representing the created libXPC connection.

method · iOS 17.4+

createVisibilityPropagationInteraction

TypeScript
createVisibilityPropagationInteraction(): SDKHandle
Swift declaration
func createVisibilityPropagationInteraction() -> any UIInteraction

attach the created interaction to a view to express that the content of that view is directly related to the working of this process. therefore, if the view is considered visible by the system then this process must also be considered to be visible. do not attempt to set an interaction on multiple views as interactions track their views - instead create a new interaction for each view that you want to propogate visibility to this process.

Skipped declarations

No declarations were skipped in this snapshot.

All BrowserEngineKit types →