Contents

handle(xpcConnection:)

Accepts or rejects an incoming XPC connection.

Declaration

func handle(xpcConnection: xpc_connection_t)

Parameters

  • xpcConnection:

    The inbound connection.

Discussion

When your browser app calls makeLibXPCConnection(), the framework calls this method on your extension, passing the newly created connection as the parameter. To accept the connection, call xpc_connection_set_event_handler(_:_:) to install an event handler and listen for incoming messages.

Otherwise, call xpc_connection_cancel(_:) to reject the connection.