I have an application with 2 class in 2 files and 2 method in classes!
I use NSRunloop and NSTimer to create a daemon.I add one of the methods to nsrunloop(this method call second method in another class).
i create a plist file for loading and startuping daemon.
when i loading daemon work good.but when i logout and login or reboot the Mac OS X, daemon not work and status of daemon is -6.
what's wrong?
I use NSRunloop and NSTimer to create a daemon.I add one of the methods to nsrunloop(this method call second method in another class).
i create a plist file for loading and startuping daemon.
Code:
<?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>Disabled</key>
<false/>
<key>Label</key>
<string>com.daemon.user</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/daemon.app/Contents/MacOS/daemon</string>
</array>
<key>UserName</key>
<string>root</string>
</dict>
</plist>
when i loading daemon work good.but when i logout and login or reboot the Mac OS X, daemon not work and status of daemon is -6.
Code:
launchctl list | grep com.daemon
- -6 com.daemon.user
what's wrong?
Last edited: