Hi. I’m trying to setup Appium server to stat automatically after system startup. Also I’d like it to restart after a crash. Appium was installed as a npm package and it launches and works fine when I type “appium” in terminal.
What I did is created file io.appium.server.plist in /Library/LaunchAgents/ with the following content:
<?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>io.appium.server</string> <key>OnDemand</key> <false/> <key>UserName</key> <string><valid_user_name></string> <key>GroupName</key> <string>staff</string> <key>ProgramArguments</key> <array> <string>appium</string> <string>--session-override</string> </array> </dict> </plist>
Then assigned proper owner (chown) and permissions (chmod) to this file and executed the command:
sudo launchctl load /Library/LaunchDaemons/io.appium.server.plist
For some reason this did not start appium server, I cannot connect to it. The “launchctl list” command reported that my task exited with 78 status code, but in Appium’s documentation I cannot find what’s meant by this exit code. Can anybody help please?