init(machServiceName:options:)
Initializes an Nsxpcconnection object to connect to a LaunchAgent or LaunchDaemon with a name advertised in a launchd.plist.
Declaration
init(machServiceName name: String, options: NSXPCConnection.Options = [])Discussion
For example, if an agent is managed with launchd and has a launchd.plist in ~/Library/LaunchAgents, this method would create a connection to that agent. The agent should use NSXPCListener to wait for new connections.
If the connection is being made to a process that is running in a privileged Mach bootstrap context (for example, a daemon started by a launchd property list in /Library/LaunchDaemons), then pass the NSXPCConnection option.