An object that represents a running network extension process.
The system guarantees that the extension process has launched by the time any init methods return.
If the extension process exits, the system calls ``onInterruption``. There can only be one extension process per
host browser. The first time this type is initialized, a process will be launched. If a extension process is all ready
running, the returned object will represent the already running process.
Members (5)
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.
If this is the last connection from the host process to the extension process, the system terminates
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 finds an existing network extension process or launches a one.
This initializer launches a new networking 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.