1、 my plist /Library/LaunchAgents/com.vivi.control.serviceAgent.plist like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.vivi.control.serviceAgent</string>
<key>ProgramArguments</key>
<array>
<string>/Users/yuellppa/Downloads/vivo_test</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
when the label is other any name but not "com.vivi.control.serviceAgent", use launchctl load /Library/LaunchAgents/com.vivi.control.serviceAgent.plist
and
launchctl unload /Library/LaunchAgents/com.vivi.control.serviceAgent.plist
is ok.
when label is "com.vivi.control.serviceAgent", launchctl load or launchctl unload get error 5: Input/output error.
use launchctl list | grep com.vivi.control.serviceAgent get nothing, so has no conflicting service。
Can anyone help me take a look?