calabash/calabash-ios — pull request #232 by jmoody (2013-10-22 04:59:38+00:00)
Title: replaced 'device_orientation' with 'status_bar_orientation' for detecting orientation of device when rotating, translating touch coordinates, and swiping.

### motivation

the `device_orientation` function returns `{face up, face down, up, down, left, right, unknown}`.

this is confusing to users because:

1. `face up` and `face down` are only returned if testing on a device and if the device has not been previously rotated by calabash.

2. `unknown` is only returned if testing on the simulator and if the simulator has not been previously rotated by calabash.

in contrast, the `status_bar_orientation` only returns `{up, down, left, right}`

### testing

***NB:*** cannot test swiping on iOS Simulator because of an [Apple bug in the simulator](http://stackoverflow.com/questions/18792965/uiautomations-draginsidewithoptions-has-no-effect-on-ios7-simulator).

testing revealed an unrelated bug in iOS 7 swiping.

tested using briar gem and Briar-cal

* 0.1.1 branch -- https://github.com/jmoody/briar
* 0.1.2 branch -- https://github.com/jmoody/briar-ios-example

testing against an app without a status bar: https://github.com/jmoody/calabash-no-status-bar

use the `@rotation` tag to test

* `bundle exec cucumber -p launch -p iphone --tags @rotation`
* `bundle exec cucumber -p launch -p ipad --tags @rotation`

#### devices and simulators

- [x] iOS 6 iPhone 4S
- [ ] iOS 7 iPhone 5C `swiping broken`
- [x] iOS 5.1 iPad 1
- [ ] iOS 7.0 iPad 4 `swiping broken`
- [x] all simulator combinations
- [x] UIA launching (when supported)
- [x] manually launching (when supported)

#### other tests

- [x] on an app with no status bar

### KNOWN ISSUES

on iOS 7 swiping is broken for any orientation other than portrait with the home button down.

this is an unrelated bug that was discovered during testing.

https://github.com/calabash/calabash-ios/issues/230