Instance Method

initWithServiceName:

Initializes an NSXPCConnection object to connect to an NSXPCListener object in an XPC service, identified by a service name.

Declaration

- (instancetype)initWithServiceName:(NSString *)serviceName;

Discussion

XPC services are helper processes that are usually part of your application bundle. The service should use NSXPCListener to wait for new connections.

See Also

Creating Connections

initWithListenerEndpoint:

Initializes an NSXPCConnection object to connect to an NSXPCListener object in another process, identified by an NSXPCListenerEndpoint object.

initWithMachServiceName:options:

Initializes an NSXPCConnection object to connect to a LaunchAgent or LaunchDaemon with a name advertised in a launchd.plist.

NSXPCConnectionOptions

Options that you can pass to a connection.