I am trying to create helper objects (it could be a daemon or an agent). This should be launch on demand and its multiple instances should be there, as you see for Chrome and Safari helpers.
What Have I tried? I have referred these Apple Docs, Launchd Tutorial & Creating Start Up Items in Mac OS X
There it is mentioned that for number of processes we should use NumberOfProcesses
key, I used it but in Activity Monitor I see only one instance.
And my plist looks 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.anoop.test</string>
<key>NumberOfProcesses</key>
<string>5</string>
<key>ProgramArguments</key>
<array>
<string>/Users/anoopvaidya/Desktop/0@/WebTwainService</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>Application is agent (UIElement)</key>
<string>YES</string>
</dict>
</plist>
Am I on correct path to replicate Launch Agent Helper as of Chrome? Please help me to find the best way to get it done?