I have a .app file that I want to run as a daemon. Now there are two ways of running .app as a daemon/agent in macOS.
-
using .app file : I can specify this in the daemon plist as:
<key>ProgramArguments</key> <array> <string>/usr/bin/open</string> <string>/Applications/myApp.app</string> </array>
-
using unix exe within .app file
<key>ProgramArguments</key> <array> <string>myApp.app/Content/MacOS/MyApp</string> </array>
Basically I wanted to know what is the Apple recommendation on how we should be creating daemon plist.
For point 2, is it appropriate to use the unix executable within bundle?Will it not cause any issue in the running application?
Is will be helpful if there is some apple documentation to support this.