From 74e22ca68962a4e098e469548d3132670c5d4a19 Mon Sep 17 00:00:00 2001 From: Ole-Kristian Sunnarvik Date: Wed, 6 Feb 2019 07:26:05 +0100 Subject: [PATCH 1/2] handling dot-version input in findMatchingSimulator also when using newest xcrun to list devices. Format of xcrun output has changed --- local-cli/runIOS/findMatchingSimulator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local-cli/runIOS/findMatchingSimulator.js b/local-cli/runIOS/findMatchingSimulator.js index 606d72adcbb762..df15f17c70f6cb 100644 --- a/local-cli/runIOS/findMatchingSimulator.js +++ b/local-cli/runIOS/findMatchingSimulator.js @@ -44,7 +44,8 @@ function findMatchingSimulator(simulators, simulatorString) { if (!version.includes('iOS') && !version.includes('tvOS')) { continue; } - if (simulatorVersion && !version.endsWith(simulatorVersion)) { + let versionWithDashReplacedByDot = version.replace(/-/g,'\.') + if (simulatorVersion && !versionWithDashReplacedByDot.endsWith(simulatorVersion)) { continue; } for (let i in devices[version]) { From 1c39f66a14ecfbfe789308659bd9284247acb169 Mon Sep 17 00:00:00 2001 From: Ole-Kristian Sunnarvik Date: Wed, 6 Feb 2019 07:40:18 +0100 Subject: [PATCH 2/2] added missing semicolon --- local-cli/runIOS/findMatchingSimulator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/runIOS/findMatchingSimulator.js b/local-cli/runIOS/findMatchingSimulator.js index df15f17c70f6cb..85608392536da7 100644 --- a/local-cli/runIOS/findMatchingSimulator.js +++ b/local-cli/runIOS/findMatchingSimulator.js @@ -44,7 +44,7 @@ function findMatchingSimulator(simulators, simulatorString) { if (!version.includes('iOS') && !version.includes('tvOS')) { continue; } - let versionWithDashReplacedByDot = version.replace(/-/g,'\.') + let versionWithDashReplacedByDot = version.replace(/-/g,'\.'); if (simulatorVersion && !versionWithDashReplacedByDot.endsWith(simulatorVersion)) { continue; }