My sister and brother in law recently made the leap to running a tea room and antiques store in Kent, called Where Memories Meet. If you’re in the Maidstone / Kent area, please drop by for an afternoon tea, cream tea or cakes and leisurely browse the beautiful antiques!
In a recent project I needed to find a way of getting the Appium node.js app to run all the time on an iOS CI server. The requirements were as follows:
- Appium must be run from the checked out Git repository
- Launch Appium on start-up, in case the server needs to be rebooted
- If Appium crashes (it does sometimes), relaunch the server
- Output stdout and stderror to a log file that I can easily view using Console.app to debug problems with Appium
This was achieved with the following launchd plist configuration file placed in ~/Library/LaunchAgents/.
<?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.companyname.appium</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/node</string> <string>/Users/Mike/Projects/appium/server.js</string> </array> <key>Debug</key> <true/> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>/Users/Mike/Projects/appium/</string> <key>StandardOutPath</key> <string>/Users/Mike/Library/Logs/appium.log</string> <key>StandardErrorPath</key> <string>/Users/Mike/Library/Logs/appium_error.log</string> </dict> </plist>
The WorkingDirectory setting is required, as Appium uses it to locate the instruments/client.js file.
Start the agent by running:
launchctl load ~/Library/LaunchAgents/<configuration name>.plist
Or stop it by running:
launchctl unload ~/Library/LaunchAgents/<configuration name>.plist
Hope this helps!
It’s tip time!
Sync your iPhone a few times incorrectly and you may end up with a mass of stubborn photos that just won’t ‘delete after syncing’ to iPhoto.
Over time this could become a huge collection of photos gobbling up precious storage space on your device, and this juggernaut of photos becomes far too many to erase by hand. You would already have these photos in iTunes and when it asks if you want to delete after import it will never select these because they have already been imported. You’ll have identical photos in iPhoto and your phone, but you can’t get the pics off your phone.
Fix this with these steps:
- Open Image Capture
- Check “delete after import”
- Drag and drop all items to a folder
- Import into iPhoto, telling it to ignore duplicates
- Clean-up the now unneeded items