How to enable( or switch )to web view in ios appium with hybrid app? pls help me

I tried this comments

/*Set contextNames = driver.getContextHandles();
for (String contextName : contextNames)
{
System.out.println(contextNames); //prints out something like NATIVE_APP \n WEBVIEW_1
}
driver.context( (String) contextNames.toArray()[1]); // set context to WEBVIEW_1
*/

its not working in ios.

I have created script using android appium .I am trying to execute the same script in IOS …

pls help me

I suspect the reason you have not received replies is because you have not really mentioned what you have done to investigate the issue yourself.
For starters, I hope you have read
http://appium.io/slate/en/v1.2.0/?java#execution-against-a-real-ios-device