calabash/calabash-ios — pull request #633 by jmoody (2014-12-02 12:04:59+00:00)
Title: Make shared element strategy default for ios8

**Acceptance**

```
1. Xcode < 6, the default strategy should be :preferences
2. Xcode >= 6
a. iOS 8 simulators and devices should be :shared_element
b. iOS < 8 simulators and devices should be :preferences
```

### Issues

There are 2 outstanding problems with using :shared_element. These will be dealt with in subsequent pull requests.

1. `send_app_to_background` does not work with :shared_element.
2. It is now possible for a user to specify an _invalid_ :uia_strategy. If, for example, a user targets a 7.1.2 device and chooses :shared_element, the tests will not run. In the past, the :host and :preferences strategy would always work regardless of the test target.

### Tests

```
$ be rspec spec/lib/launcher_spec.rb:15
Run options: include {:locations=>{"./spec/lib/launcher_spec.rb"=>[15]}}

Calabash Launcher
.default_uia_strategy
returns :shared_element when
Xcode >= 6.0 - DEVICE_TARGET == 'simulator'
Xcode >= 6.0 - DEVICE_TARGET is an iOS >= 8 simulator
and DEVICE_TARGET is a simulator with a custom name e.g. 'my simulator'
and DEVICE_TARGET is instruments identifier e.g. 'iPad 2 (8.1 Simulator)'
and DEVICE_TARGET is simulator UDID e.g. '12EE4E79-D561-46D2-9F80-BB7278E4A883'
Xcode >= 6.0 - DEVICE_TARGET is an iOS >= 8 device
and DEVICE_TARGET is a device UDID
and DEVICE_TARGET == 'device'
raises an error when
DEVICE_TARGET is a simulator, but no such simulator can be found
DEVICE_TARGET is a device, but no such device can be found
returns :preferences when
Xcode < 6.0 - not a CoreSimulator environment
Xcode >= 6.0 - DEVICE_TARGET is an iOS < 8 simulator
and DEVICE_TARGET is a simulator with a custom name e.g. 'my simulator'
and DEVICE_TARGET is instruments identifier e.g. 'iPad 2 (7.1 Simulator)'
and DEVICE_TARGET is simulator UDID e.g. '12EE4E79-D561-46D2-9F80-BB7278E4A883'
Xcode >= 6.0 - DEVICE_TARGET is an iOS < 8 device
and DEVICE_TARGET is a device UDID
and DEVICE_TARGET == 'device'

Finished in 2.03 seconds (files took 0.33271 seconds to load)
14 examples, 0 failures
```