try built-in ideviceinstaller if we don't have one

This commit is contained in:
Jonathan Lipps
2013-11-20 10:14:09 -08:00
parent 9bea66b714
commit efe804bafa
+9 -3
View File
@@ -465,11 +465,17 @@ IOS.prototype.installSafariLauncher = function(cb) {
IOS.prototype.installIpa = function(cb) {
logger.info("Installing ipa found at " + this.ipa);
var idiPath = path.resolve(__dirname, "../../../build/",
"libimobiledevice-macosx/ideviceinstaller");
try {
this.realDevice = new IDevice(this.udid);
} catch (e) {
return cb(new Error("Could not find ideviceinstaller, please make " +
"sure it's compiled and on your PATH"));
} catch (e1) {
logger.info("Couldn't find ideviceinstaller, trying built-in");
try {
this.realDevice = new IDevice(this.udid, {cmd: idiPath});
} catch (e2) {
return cb(e2);
}
}
var d = this.realDevice;
async.waterfall([