Skip to content

Commit

Permalink
Fixes #154 - os-sim 4.x - if devicetypeid doesn't have the prefix com…
Browse files Browse the repository at this point in the history
….apple.CoreSimulator.SimDeviceType, add it
  • Loading branch information
shazron committed May 14, 2015
1 parent 900cd79 commit 6a1fe26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands.js
Expand Up @@ -108,6 +108,12 @@ function processDeviceTypeId(devicetypeid) {
ret_obj.runtime = arr[1].trim();
}

// check whether devicetype has the "com.apple.CoreSimulator.SimDeviceType." prefix, if not, add it
var prefix = 'com.apple.CoreSimulator.SimDeviceType.';
if (devicetype.indexOf(prefix) != 0) {
devicetype = prefix + devicetype;
}

// now find the devicename from the devicetype
var options = { 'silent': true };
var list = simctl.list(options).json;
Expand Down

0 comments on commit 6a1fe26

Please sign in to comment.