From e6c8726243311f5afff21ccf2d517380f33fb838 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 22 Jun 2018 07:51:18 -0400 Subject: [PATCH] [sdks] Delete ios simulators created by old versions of xcode if needed. (#9263) --- sdks/ios/harness/harness.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdks/ios/harness/harness.cs b/sdks/ios/harness/harness.cs index c666e56bd37..5c124dd7c47 100644 --- a/sdks/ios/harness/harness.cs +++ b/sdks/ios/harness/harness.cs @@ -91,6 +91,15 @@ public class Harness Environment.Exit (1); } + if (state_line.Contains ("unavailable")) { + // Created for an older version of xcode + var args = "simctl delete unavailable"; + Console.WriteLine ("Running: " + "xcrun " + args); + var process = Process.Start ("xcrun", args); + process.WaitForExit (); + state_line = ""; + } + bool need_start = false; if (state_line == "") { // Get the runtime type -- 2.11.4.GIT