IOSDriver< WebElement> AD= (IOSDriver) driver; AD.getKeyboard().sendKeys(Keys.RETURN);

Hi…In my IOS while entering my Login details,keyboard enables on login button.So i need to click on return keyboard to hide the keyboard.But in case of simulator,keyboard does not enable to enter login details.So there is no keyboard.The server types the login details.So using same project how to handle the return keyboard.Please help
Platform:IOS
Appium version: 1.5.2
Simulator and Real Device:Real Divide iPhone5s,Simulator iPhone6
language:Java
OS:MAC

Thanks,
Vani