Driver.close() shows up an error

Hello All,
Can someone explain me the difference between close and CloseApp() in appium ?

Reason I’m eager to know because - in my attempt to use below line of code


encountered an error message stating "WebDriverException: Not implemented in this context, try switching into or out of a web view”

Here I am confused, where am I trying to switch into web view ?

System Information:-

Xcode: 7.2
Appium 1.4.13
Java : 8
iOS: 9.2


Crash app manually and then relaunch it in same session

Error Logs:-

I noticed error to be

Exception in thread “main” org.openqa.selenium.WebDriverException: Not implemented in this context, try switching into or out of a web view (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8 milliseconds
Build info: version: ‘2.48.2’, revision: ‘41bccdd’, time: ‘2015-10-09 19:55:52’
System info: host: ‘VIJAYs-MacBook-Pro.local’, ip: ‘’, ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.8.0_60’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{networkConnectionEnabled=false, noReset=true, warnings={}, databaseEnabled=false, deviceName=iPad 2, version=9.2, fullReset=true, platform=MAC, AppName=DataGrinchApp, desired={noReset=true, platformName=iOS, deviceName=iPad 2, version=9.2, fullReset=true, AppName=DataGrinchApp}, webStorageEnabled=false, locationContextEnabled=false, browserName=iOS, takesScreenshot=true, javascriptEnabled=true, platformName=iOS}]
Session ID: 392177c4-f6b8-493a-be89-cfb6c9bf0440
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.openqa.selenium.remote.ErrorHandler.createThrowable(
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at io.appium.java_client.DefaultGenericMobileDriver.execute(
at io.appium.java_client.AppiumDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.close(
at ios.resusefunctions.stop(
at ios.crash.logContinousCrashOnline(
at ios.mainclass.main(

Solution that I implemented.

replaced driver.close() with driver.closeApp() method.