Getting error when try to open app in real device using Appium

I have configured everything and just written below code :

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“udid”, “xxxxxxxxxxxxxxx”);
capabilities.setCapability(“bundleid”, “xxxxxxxxxxx”);

capabilities.setCapability("deviceName","New White ipad");
capabilities.setCapability("platformVersion", "8.3");

driver = new IOSDriver(new URL(“”), capabilities);

When I run this code , I am getting error :

A new session could not be created. (Original error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 216 milliseconds

Do I need to set anything in Appium? Then please let me know.

Any help would be appreciated.

As the above error states, you need to provide the capability “app” and give “/Users/jack/Desktop/test.ipa” as the value.


As said above
should be

If you ipa is already installed in your ipad you can remove this “app” capability
you can give
capabilities.setCapability(“appPackage”,“package name of app”);
capabilities.setCapability(“appActivity”,“Launcher activity of app”);

Basically appium server for creating session want’s to know which app to launch it identifies it using capability “app” or it launches bases on package and launcher activity name if app is already installed

1 Like

Thanks a lot for quick help , I have changed as you said but now I am getting error : > Could not initialize ideviceinstaller; make sure it is installed and works on your system

What could be reason?

Install ideviceinstaller using the below command(provided HomeBrew is already installed)

brew install --HEAD ideviceinstaller

When I am trying to install , I am getting error :

Failed to download resource “ideviceinstaller”
Failure while executing: git clone --branch master /Library/Caches/Homebrew/ideviceinstaller–git

Kindly help.

I am able to install ideviceinstaller successfully using

brew install --HEAD ideviceinstaller

I suspect the proxy settings of your machine to be the culprit.

1 Like

Thanks a lot , it is solved… Thanks for help…