I'm having trouble finding working examples of using the xpc.h (c lib) API. There are a number of examples showing NSXPC but I'm trying to use the xpc.h interface.
I have a CUPS backend (Unix command line) program that needs to open a url in the user's browser. This is no longer allowed within a CUPS backed starting with Yosemite, so DTS advised that I look into building a Launch Agent (also Unix command line) which can open the url and then have the CUPS backend contact it via XPC.
I tried using the following but it seg faults.
https://eminisnp500.wordpress.com/2012/01/31/using-mac-os-xpc-service-with-launchd/
Also, since launchd needs to run my XPC server, how does one go about debugging this? I didn't think I could start my XPC server from xcode because only launchd could bind the Mach service. Is there a preferred way to build/debug a LaunchAgent that hosts an XPC Mach service?
Finally, do these programs need to be signed with my Developer ID (can you even sign command line programs)?
Thanks
William