Change the context to Webview under iOS 8

Hello I’m new here and I need help.
I can not change the context to WebView under iOS8.
Under android it works fine.
I tried that with the following code.

      Set<String> contextNames = driver.getContextHandles();
      for (String contextName : contextNames) {
              if (contextName.contains("WEBVIEW")) {
      WebElement inputField = driver.findElement("username"));

Under aOS I can switch the context to webview in the appium gui. I can select “no context”, “NATIVE APP” and “WEBVIEW”.
Under iOS is that not possible.


I just started dealing with webview contexts. My initial suggestion is to make sure you’ve driven your app into a hybrid portion of the app to where a webview context physically exists. See my comments in this thread in case they help at all: Mobile: scrollTo fails in iOS hybrid webview