Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is the example of working plist to run Appium server using launchctl on Mac. See comments for more info and steps how to use 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>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>com.company.appium.server</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/usr/local/lib/node_modules/appium/build/lib/main.js</string>
</array>
<key>StandardOutPath</key>
<string>/Users/path/to/logs/stdout.log</string>
<key>StandardErrorPath</key>
<string>/Users/path/to/logs/stderr.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>ANDROID_HOME</key>
<string>/path/to/android-sdk</string>
<key>JAVA_HOME</key>
<string>/path/to/java-home</string>
<key>PATH</key>
<string>/content/of/path/env/var</string>
</dict>
</dict>
</plist>
@risinek

This comment has been minimized.

Show comment
Hide comment
@risinek

risinek Mar 12, 2018

  1. You need to have appium installed using npm install -g appium
  2. Copy this file to /Library/LaunchAgents/
  3. Run launchctl load com.company.appium.server.plist
    Appium server should start everytime it crashed or system was rebooted.
Owner

risinek commented Mar 12, 2018

  1. You need to have appium installed using npm install -g appium
  2. Copy this file to /Library/LaunchAgents/
  3. Run launchctl load com.company.appium.server.plist
    Appium server should start everytime it crashed or system was rebooted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment