xpc_main(_:)
Starts listening for incoming connections and processes them with the specified event handler.
Declaration
func xpc_main(_ handler: xpc_connection_handler_t) -> NeverParameters
- handler:
The handler to accept new connections with.
Discussion
This is the springboard into the XPC service runtime. This function sets up your service bundle’s listener connection and manages it automatically. After this initial setup, this function calls dispatchMain(). You may override this behavior by setting the RunLoopType key in your XPC service bundle’s Info.plist under the XPCService dictionary.