Merge pull request #3267 from erlendfh/resolve-ios-simulator-directory

Resolve iOS Simulator directory
This commit is contained in:
Jonathan Lipps
2014-07-31 11:48:28 -07:00

View File

@@ -472,6 +472,17 @@ iOSController._getFullPath = function (remotePath, cb) {
logger.warn("There were multiple simulator roots for version " + v + ". " +
"We may be pulling the file from the one you're not using!");
}
if (simRoots.length > 1) {
var filteredSimRoots = simRoots.filter(function (root) {
return fs.existsSync(root + "/Applications");
});
if (filteredSimRoots.length > 0) {
simRoots = filteredSimRoots;
}
}
var basePath = simRoots[0];
var appName = null;