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!

Categories
Uncategorized

How to Remove a Mass of Stubborn Photos from Your iPhone

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:

  1. Open Image Capture
  2. Check “delete after import”
  3. Drag and drop all items to a folder
  4. Import into iPhoto, telling it to ignore duplicates
  5. Clean-up the now unneeded items

Source: wirededucator.com

Categories
programming

Xcode 4.3 / 4.4, Archive Build, Strip Static Library Bug

Sometimes it can be quite useful to hide a static library inside another one to hide the details of the inner static library from an application. We successfully did this with the Urban Airship library, but were having problems in a specific situation where the application would crash on first access of a method defined in the inner static library.

  1. Create an application that links against a static library (A), which in turn links against an already compiled static library (B)
  2. In the main application, write code that invokes a method defined in library (B)
  3. Archive the application
  4. Export the application into an IPA
  5. Run this IPA on a device
  6. Witness an EXC_CRASH (SIGSYS) in the crash log

I found the solution, which describes a bug in Xcode 4.3+. This still happens in Xcode 4.4.

“When performing an Archive action, Xcode uses the *project-level* build setting for STRIP_INSTALLED_PRODUCT rather than the target-level setting.”

More info here:

[Bug] Xcode Wrongly Applies Project Settings during Target Archive