wjens wrote> 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?While I couldn't get Xcode to attach to the XPC Mach service I'm working on through the method described this this post by ktam2, you can, however, also attempt to attach the lldb debugger to the XPC service Launch Agent at the command line with:launchctl attach -s gui/UID_ofLoggedInUser/labelOfXPCLaunchAgentRefer to the launchctl(1) man page. Also, the WaitForDebugger key is mentioned in the launchd.plist(5) man page.> Finally, do these programs need to be signed with my Developer ID (can you even sign command line programs)?You can Code Sign and Sandbox a single file executable by embedding an info.plist into it. In the Target’s Build Settings in the Other Linker Flags field, add the following to get the info.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: