private static MutableCapabilities buildAppCapabilities(Client app) {
    MutableCapabilities capabilities = new MutableCapabilities();
    // The absolute local path or remote http URL to an .ipa or .apk file, or a .zip containing one of these.
    // Appium will attempt to install this app binary on the appropriate device first.
    BrowserSpecs specs = app.getBrowserSpecs();
    if (specs.getVersion() != null) {
      capabilities.setCapability(CapabilityType.VERSION, specs.getVersion());
    }
//    capabilities.setCapability("browserName", "app");
//    capabilities.setCapability("appium:app", app.getAppName());
    capabilities.setCapability("deviceName", specs.getDeviceName());
    capabilities.setCapability("platformName", specs.getPlatform());
    if (specs.getPlatformVersion() != null) {
      capabilities.setCapability("platformVersion", specs.getPlatformVersion());
    }
    if (specs.getPlatform().name().toLowerCase().equalsIgnoreCase("ios")) {
      capabilities.setCapability("automationName", "XCUITest");
      capabilities.setCapability("appium:udid", specs.getDeviceName());
      capabilities.setCapability("appium:bundleId", app.getAppPackage());
    }
    if (specs.getPlatform().name().toLowerCase().equalsIgnoreCase("android")) {
      capabilities.setCapability("autoGrantPermissions", true);
      capabilities.setCapability("fullReset", app.isFullReset());
    }
    if (app.getApp().getAppWorkingDir() != null) {
      capabilities.setCapability("appium:appWorkingDir", app.getApp().getAppWorkingDir());
    }
    if (app.getAppPackage() == null || app.getAppActivity() == null) {
      logger.warn("Using [" + app.getAppName() + "]: Some mobile applications may require appPackage and appActivity " +
          "to setStartTimestamp properly ..");
      if (app.getAppPackage() != null) {
        capabilities.setCapability("appPackage", app.getAppPackage());
      }
      if (app.getAppActivity() == null) {
        capabilities.setCapability("appActivity", app.getAppActivity());
      }
    } else {
      capabilities.setCapability("appPackage", app.getAppPackage());
      capabilities.setCapability("appActivity", app.getAppActivity());
    }
    return capabilities;
  }
Build capabilities for app appium driver

@param app the Client object
@return capabilities appium driver
KITE-Framework/src/main/java/org/webrtc/kite/WebDriverFactory.java