Categories
programming

NSDates, NSTimeZones, NSCalendars and NSDateComponents. Oh my.

Best practices on using dates and times in Cocoa by my ex-colleague Kent Humphries. Every Apple developer should read this.

Categories
programming

Pod Install/Update Via SourceTree Shortcut

Fed up of opening up Terminal just to do a pod install or update? Set up a Custom Action in SourceTree to quickly get the task done.

SourceTree Custom Action Pod Install/Update

Categories
programming

Starting Appium Via launchd

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:

  1. Appium must be run from the checked out Git repository
  2. Launch Appium on start-up, in case the server needs to be rebooted
  3. If Appium crashes (it does sometimes), relaunch the server
  4. Output stdout and stderror to a log file that I can easily view using Console.app to debug problems with Appium buy cialis super active

This was achieved with the following launchd plist configuration file placed in ~/Library/LaunchAgents/.

 

[snippet id=”53″]

 

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!