init(onSessionRequest:)
Initializes the connection handler with a closure that accepts an XPC session.
Declaration
@MainActor @preconcurrency init(onSessionRequest requestHandler: @escaping @Sendable (XPCListener.IncomingSessionRequest) -> XPCListener.IncomingSessionRequest.Decision)Discussion
Use this initializer if your app extension communicates with the host app using types from the XPC framework.