jmoody/calabash-ios-example — pull request #5 by jmoody (2014-10-29 14:09:53+00:00)
Title: **DEMO** Do not merge - Reproduce issue 566 and 536 intermittent timeouts.

Requires Xcode 6.1.

### Reproduce

```
1. git clone git@github.com:jmoody/calabash-ios-example.git jmoody-ios-example
2. cd jmoody-ios-example
3. git fetch
4. git co -t origin/demo/reproduce-issue-566-and-536-intermittent-timeouts
5. ./sim-prepare.sh
6. be cucumber -t @user_defaults
```

### Expected

This Scenario should pass:

```
Scenario: 21 The switch should be on because I did not reset the app before this Scenario
Then I should see the files I put in the sandbox
Then I should see the switch is on
```

### Found

The Scenario fails because there is no entry in the NSUserDefaults plist for the "com.xamarin.lpsimpleexample Switch State" which is set when the switch is touched.

### Notes

You can assert that the `com.xamarin.lpsimpleexample Switch State` key/value pair exist on disk _after_ touching the button. However, some time later the plist is clobbered by UIAutomation.

### Regression

##### Xcode 6.1 iOS 7.1

```
$ be cucumber -p iphone5_mid
```

This passes because UIAutomation and NSUserDefaults use different backing plists.

##### :host strategy

If you force a :host strategy, the tests pass because the UIAutomation preferences API is not called.