A while ago I needed to add some video playback functionality to an Android application I’m working on. I had the video files in the assets directory of the application. I needed to figure out how to get those videos playing on the screen. This turned out to be harder than I originally expected.

I tried to configure a launch daemon to OS X but stumbled on a configuration issue that in my opinion isn’t explained very clearly in the documentation. Perhaps I’m the only one to find it unclear but in the case that somebody else should get stuck with the same issue I’ll explain it here.

This issue is about the Program and ProgramArguments keys in the launchd.plist configuration file. Those keys specify the command that should be run as the launch daemon or agent. I won’t explain anything general about launch daemons or agents here since it’s documented in many places already.