Contents

init(onConnection:)

Initializes the connection handler with a closure that accepts a Foundation XPC object.

Declaration

@MainActor @preconcurrency init(onConnection connectionHandler: @escaping  @Sendable (NSXPCConnection) -> Bool)

Discussion

Use this initializer if your app extension communicates with the host app using XPC.

See Also

Initializing the connection handler