Is it possible to reinstall the app on iOS when using the SDK?

We have a nightly build job that deposits an IPA file in a folder where our current automation solution can find it and install it on the devices before running the tests. We’re looking into TestProject and we would like to accomplish the same thing.

I’m aware that it’s possible to reinstall the app on the website using this switch:

Unfortunately I can’t seem to find a mirror of this functionality for coded tests. The “fullReset” capability in Appium seems to be what I want, but it doesn’t seem to do anything whether I put it there or not.

Below is my current getCapabilities() method:

  public static DesiredCapabilities getCapabilities() {
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.IOS);
    capabilities.setCapability(MobileCapabilityType.UDID, udid);
    capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
    capabilities.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "com.example.DemoApp");
    capabilities.setCapability(MobileCapabilityType.APP, "I:\\build\\iOS\\DemoApp.ipa");
    capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
    capabilities.setCapability(MobileCapabilityType.NO_RESET, false);
    capabilities.setCapability("enforceAppInstall", true);
    return capabilities;

I get this error when trying to use the driver.installApp(String appPath) method:

An unknown server-side error occurred while processing the command. Original error: this.opts.device.installApp is not a function

I feel like I must be missing something… I’d like to be able to use a local IPA file if possible, but even if I couldn’t use a local IPA file, there must be a way to at least install the newer version that was uploaded to the website, right? As of right now the only way I can find to install the app on an iOS device is to run a test/job from the website and flip the reinstall switch I mentioned above.

1 Like

Update: Still not working. After the driver is initialized, I ran this bit of code to see what the capabilities were:

for(String capability : driver.getCapabilities().getCapabilityNames()) {
  System.out.println("> " + capability);

This was the result:

> ScaleFactor
> app
> automationName
> browserName
> bundleId
> databaseEnabled
> deviceName
> javascriptEnabled
> locationContextEnabled
> networkConnectionEnabled
> newCommandTimeout
> noReset
> platform
> platformName
> platformVersion
> realDevice
> simpleIsVisibleCheck
> skipDeviceDetect
> takesScreenshot
> tp:guid
> udid
> useExternalWDA
> usePrebuiltWDA
> waitForQuiescence
> webDriverAgentUrl
> webStorageEnabled

It looks like fullReset is not being added to the capabilities, and noReset is being added. That’s likely where my issues lie. This seems like it might be a bug? This seems to work properly on Android, although it downloads the APK from the TestProject website instead of using a local one, but I’d rather have that than nothing.

1 Like

Anyone have any ideas? I have a hacky workaround where I call ideviceinstaller.exe via an exec call, but that’s not how this should work.

Hello @hockiand,

We are looking into this issue,
I will update you once I have an answer.

1 Like

Hi @artem.kuznetsov, any news from this? Im getting the same issue

@hockiand Hi! you solve this?, im getting the same issue. Thanks!

Hi @pablo.slaj1 ,

We have opened a ticket on this issue,

You will be notified here once it’s resolved.

This is the ticket number: TP-17032