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.
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.
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.
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.
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.