Appium Doctor returns "Could not detect Mac OS X Version" using OSX 10.10

Because Appium 1.3.1 not support MAC OS 10.10 yet, but you can modify default script solve this issue.

default path: /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/doctor/ios.js

IOSChecker.prototype.getMacOSXVersion = function (cb) {
  exec("sw_vers -productVersion", function (err, stdout) {
    if (err === null) {
      if (stdout.match('10.8') !== null) {
        this.osVersion = '10.8';
        cb(null, "Mac OS X 10.8 is installed.");
      } else if (stdout.match('10.9') !== null) {
        this.osVersion = '10.9';
        cb(null, "Mac OS X 10.9 is installed.");
      } else if (stdout.match('10.10') !== null) {
        this.osVersion = '10.10';
        cb(null, "Mac OS X 10.10 is installed.");
      } else {
        this.log.fail("Could not detect Mac OS X Version", cb);
      }
    } else {
      this.log.fail("Unknown SW Version Command: " + err, cb);
    }
  }.bind(this));
};

PinLiang, Chen

2 Likes