node-simctl
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -5,3 +5,3 @@ import { exec, SubProcess } from 'teen_process'; | ||
import _ from 'lodash'; | ||
import { getCommandLineToolsVersion, getVersion } from 'appium-xcode'; | ||
import { getClangVersion, getVersion } from 'appium-xcode'; | ||
@@ -12,3 +12,3 @@ | ||
// command line tools and xcode version can be different | ||
const CMDLINE_TOOLS_FORMAT_CHANGED_VERSION = '10.2'; | ||
const CMDLINE_TOOLS_CLANG_FORMAT_CHANGED_VERSION = '1001.0.46'; | ||
const XCODE_FORMAT_CHANGED_VERSION = '10.2'; | ||
@@ -362,4 +362,3 @@ | ||
let udid; | ||
// first make sure that the runtime id is the right one | ||
// at first make sure that the runtime id is the right one | ||
// in some versions of Xcode it will be a patch version | ||
@@ -372,11 +371,16 @@ try { | ||
if (util.compareVersions(await getCommandLineToolsVersion(), '>=', CMDLINE_TOOLS_FORMAT_CHANGED_VERSION) | ||
|| util.compareVersions(await getVersion(false), '>=', XCODE_FORMAT_CHANGED_VERSION)) { | ||
// 1st comparison: getCommandLineToolsVersion | ||
// Command line tool version is 10.2+, but xcode 10.1 can happen | ||
const clangVersion = await getClangVersion(); | ||
// 1st comparison: clangVersion | ||
// Command line tools version is 10.2+, but xcode 10.1 can happen | ||
let isNewerIdFormatRequired = clangVersion && util.compareVersions(clangVersion, '>=', | ||
CMDLINE_TOOLS_CLANG_FORMAT_CHANGED_VERSION); | ||
if (!isNewerIdFormatRequired) { | ||
// 2nd comparison: getVersion | ||
// The opposit also can happen, | ||
// but the combination of 10.2 command line tool and lower Xcode version happens frequently than this case | ||
// On Travis's Xcode 10.2 image happens, for instance | ||
// The opposite can also happen, | ||
// but the combination of 10.2 command line tools and lower Xcode version happens more frequently | ||
const xcodeVersion = await getVersion(false); | ||
isNewerIdFormatRequired = xcodeVersion && util.compareVersions(xcodeVersion, '>=', | ||
XCODE_FORMAT_CHANGED_VERSION); | ||
} | ||
if (isNewerIdFormatRequired) { | ||
runtimeId = `${SIM_RUNTIME_NAME}${platform}-${runtimeId.replace(/\./g, '-')}`; | ||
@@ -386,2 +390,3 @@ } | ||
log.debug(`Creating simulator with name '${name}', device type id '${deviceTypeId}' and runtime id '${runtimeId}'`); | ||
let udid; | ||
try { | ||
@@ -388,0 +393,0 @@ const out = await simExec('create', 0, [name, deviceTypeId, runtimeId]); |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"author": "https://github.com/appium", | ||
@@ -35,3 +35,3 @@ "license": "Apache-2.0", | ||
"appium-support": "^2.26.0", | ||
"appium-xcode": "^3.1.0", | ||
"appium-xcode": "^3.8.0", | ||
"asyncbox": "^2.3.1", | ||
@@ -38,0 +38,0 @@ "lodash": "^4.2.1", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127531
1445
Updatedappium-xcode@^3.8.0