I've placed the following com.apple.test.plist file in the folder:
/System/Library/LaunchDaemons
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.Spotlight</string>
<key>ProgramArguments</key>
<array>
<string>/Users/todd/Dropbox/client/CLIENT.BUILDS/MAC/v0.1/ApplicationTest.app</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
But for some reason ApplicationTest.app does not start when i login with my user todd.
Any ideas?
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With