I am trying to use NSXPCConnection
in swift.
So, this line:
_connectionToService = [[NSXPCConnection alloc] initWithServiceName:@"SampleXPC"];
can be replaced by this line:
_connectionToService = NSXPCConnection(serviceName: "SampleXPC")
And, this line:
_connectionToService.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(StringModifing)];
can be replaced by this line:
_connectionToService.remoteObjectInterface = NSXPCInterface(protocol: <#Protocol#>)
Now I am confused about using the correct replacement for: <#Protocol#>
in swift, in objective c I would have used: @protocol(StringModifing)
, but in swift I am clueless :(