calabash/run_loop — pull request #9 by jmoody (2014-08-01 15:36:41+00:00)
Title: WIP launching xcode6 simulator

**WIP: DO NOT MERGE** This is a work-in-progress pull request.

## motivation

The simulator environment on Xcode 6 has changed dramatically.

The instruments cli tool is also very buggy [1].

* The Xcode iOS Simulator _must_ be running when instruments tries to launch the app.
* The app _must not_ be running in the simulator.
* The app _must_ be installed on the simulator that is being targeted.

**NB** This pull request does not enable or fix calabash testing on iOS 8 [2].

## todo

- [ ] enable accessibility on simulator automatically so run_loop can be tested in isolation
- [ ] enable simulator testing on travis ci (current specs are wrapped in `unless travis_ci?`)

## testing

To run the specs locally:

```
# WARNING: will open and close the simulator several times
$ be rake spec
Finished in 32.92 seconds (files took 0.14264 seconds to load)
27 examples, 0 failures
```

## links

- [1] Instruments 6 CLI problems http://www.openradar.me/radar?id=5840111442853888
- [2] UIAutomation Bugs https://gist.github.com/jmoody/27a3378d8d641b7f9012

## test output

```
RunLoop::Core
.default_tracetemplate
always returns a template
returns a template for Xcode >= 5.0
.udid_and_bundle_for_launcher
5.1 <= xcode < 6.0 behavior
returns the correct default simulator if none is defined
xcode >= 6.0 behavior
returns the correct default simulator if none is defined

RunLoop
.run
launching on simulator
can launch current version of xcode
launches apps on simulator for 5.1 <= Xcode < 6.0
```

cc @krukow