How can I start a Program.app with LaunchDaemons (launchd)?

為{幸葍}努か 提交于 2019-12-04 17:08:48

The key ProgramArguments expects an executable file but you provided an application bundle, which is a glorified directory. In order to start the application you have to point launchd to the executable inside the bundle:

<key>ProgramArguments</key>
<array>
<string>/Users/todd/Dropbox/client/CLIENT.BUILDS/MAC/v0.1/ApplicationTest.app/Contents/MacOS/ApplicationTest</string>
</array>

Alternatively use the open(1) command to run the application:

<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-W</string>
<string>/Users/todd/Dropbox/client/CLIENT.BUILDS/MAC/v0.1/ApplicationTest.app</string>
</array>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!