What is the difference between using IOSDriver and RemoteWebDriver to launch the Simulator?

Hey All,
Can anyone help me understand what is the difference between these two codes?
One uses IOS Driver and one uses RemoteWebDriver. Which one is better? Why would people use one and not the other? I got the code from a book and the other from online. Which one do people usually use to launch the iOS simulator? Which one is outdated and which one is the correct standard?

public class IOSSimulatorWithIOSDriver {
public static void main(String… args) throws InterruptedException, MalformedURLException{
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(“platformName”, “iOS”);
desiredCapabilities.setCapability(“platformVersion”, “9.0”);
desiredCapabilities.setCapability(“deviceName”, “iPhone 6”);
desiredCapabilities.setCapability(“app”, “safari”);

	IOSDriver<?> driver;
    driver= new IOSDriver(new URL(""), desiredCapabilities);
    WebElement ele =driver.findElement(By.name("q"));
    ele.sendKeys("Packt Publishing");
    WebElement searchButton =


public class IOSSimulatorWithRemoteWebDriver {

public static void main(String... args) throws InterruptedException{
   DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
   desiredCapabilities.setCapability("platformName", "iOS");
   desiredCapabilities.setCapability("platformVersion", "9.0");
   desiredCapabilities.setCapability("deviceName", "iPhone 6");
   desiredCapabilities.setCapability("app", "safari");
   URL url = null;

   try {
        url = new URL("");
   catch (MalformedURLException e) 
    WebDriver remoteWebDriver = new RemoteWebDriver(url, desiredCapabilities);
    WebElement ele = remoteWebDriver.findElement(By.name("q"));
    ele.sendKeys("Packt Publishing");
    WebElement searchButton = remoteWebDriver.findElement(By.name("btnG"));


@seleniumappiumnewbie, Its preferable to use IOSDriver to launch iOS simulator.

According to my understanding, as you can see in attachment. The IOSDriver extends from AppiumDriver and AppiumDriver extends from RemoteWebDriver. This means if you want to use some specific function on IOS, it’s better that select IOSDriver.

Continue on this topic. i am not very clear what’s the relationship between MobileDriver and AppiumDriver. Or what’s the difference and when we will use MobileDriver and When we can use AppiumDriver ?

Thanks. I will start using IOSDriver only. I have to remember to suppress the raw types warnings for IOSDriver. Is there a way to handle the IOSDriver raw types without suppressing the warnings?

@seleniumappiumnewbie, I am also getting same warning , I am also searching for reliable solution to suppress warning. Refer this link, I have raised this problem in appium discussion forum.

Thanks Selvi for the link.

1 Like


Could you please let me know why I can’t instantiate IOSDriver ? I can’t get my head around it.
Kind regards,


Where do I get IOSDriver? Can’t find anything in the documentation

Same here. Can’t find it anywhere

import io.appium.java_client.ios.IOSDriver;

IOSDriver iosdriver = new IOSDriver(new URL(“”+strAppiumPort+“/wd/hub”), capabilities);

Thank you, but where do i find the class online?