SMAppService daemon not running

My app uses SMAppService to register a privileged helper, the helper registers without errors, and can be seen in System Settings. I can get a connection to the service and a remote object proxy, but the helper process cannot be found in Activity Monitor and the calls to the proxy functions seem to always fail without showing any specific errors. What could be causing this situation?

Answered by DTS Engineer in 848889022

It sounds like your launchd job is failing to start. There are two common reasons for that:

  • launchd tries to start it and it crashes.
  • launchd is unable to start it.

A good place to… ahem… start is to look for a crash report. In the first case, and many times in the second case as well, a failure will generate a crash report.

If that doesn’t show up anything, add a ‘first light’ log point to your job [1]. Then try to communicate with the named XPC endpoint. That’ll divide the problem in half:

  • If you see a log entry, you know that your job started and you can debug your code.
  • If not, you know that your code never got running and you can debug your configuration.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] I explain this ‘first light’ concept in Debugging a Network Extension Provider.

Accepted Answer

It sounds like your launchd job is failing to start. There are two common reasons for that:

  • launchd tries to start it and it crashes.
  • launchd is unable to start it.

A good place to… ahem… start is to look for a crash report. In the first case, and many times in the second case as well, a failure will generate a crash report.

If that doesn’t show up anything, add a ‘first light’ log point to your job [1]. Then try to communicate with the named XPC endpoint. That’ll divide the problem in half:

  • If you see a log entry, you know that your job started and you can debug your code.
  • If not, you know that your code never got running and you can debug your configuration.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] I explain this ‘first light’ concept in Debugging a Network Extension Provider.

SMAppService daemon not running
 
 
Q