diff --git a/src/Microsoft.DotNet.XHarness.Apple/Orchestration/BaseOrchestrator.cs b/src/Microsoft.DotNet.XHarness.Apple/Orchestration/BaseOrchestrator.cs index 76b6d560232d4..488a3c7342c5b 100644 --- a/src/Microsoft.DotNet.XHarness.Apple/Orchestration/BaseOrchestrator.cs +++ b/src/Microsoft.DotNet.XHarness.Apple/Orchestration/BaseOrchestrator.cs @@ -160,6 +160,9 @@ public abstract class BaseOrchestrator : IDisposable return ExitCode.DEVICE_NOT_FOUND; } + // Uninstall the app first to get a clean state + await UninstallApp(target.Platform, appBundleInfo.BundleIdentifier, device, cancellationToken); + exitCode = await InstallApp(appBundleInfo, device, target, cancellationToken); if (exitCode != ExitCode.SUCCESS)