Real safari ios7

For a real device the SafariLauncher starts Safari with an active web view. As such there is no apple button to click and the execution fails as it cannot find the element, i.e.

info: We're on iOS7: clicking apple button to get into a webview
info: Pushing command to appium work queue: "au.elemForAction(au.getElementByXpath('//window[2]/scrollview[1]/button[1]'), 0).tap()"
debug: Sending command to instruments: au.elemForAction(au.getElementByXpath('//window[2]/scrollview[1]/button[1]'), 0).tap()
info: [INSTSERVER] Sending command to instruments: au.elemForAction(au.getElementByXpath('//window[2]/scrollview[1]/button[1]'), 0).tap()
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":7,"value":null}

Adding a check whether a udid has been set and not clicking the apple button resolves this issue.

In addition, click() results in the following error on a real device:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)

This is caused by calling the nonSyntheticWebClick for iOS 7.