You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2015/09/14 17:14:01 UTC

[3/3] ios commit: CB-9328 Use ios-sim as a node module, not a CLI utility

CB-9328 Use ios-sim as a node module, not a CLI utility


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d050f499
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d050f499
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d050f499

Branch: refs/heads/CB-9328
Commit: d050f499a355052613ae1a165e548a435dcdeacc
Parents: 47154c3
Author: Simon MacDonald <si...@gmail.com>
Authored: Wed Sep 9 00:00:09 2015 -0400
Committer: Simon MacDonald <si...@gmail.com>
Committed: Mon Sep 14 11:10:09 2015 -0400

----------------------------------------------------------------------
 bin/templates/scripts/cordova/lib/run.js | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d050f499/bin/templates/scripts/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js
index 3e4c0ac..f1efbf2 100644
--- a/bin/templates/scripts/cordova/lib/run.js
+++ b/bin/templates/scripts/cordova/lib/run.js
@@ -20,10 +20,11 @@
 /*jshint node: true*/
 
 var Q = require('q'),
-    nopt  = require('nopt'),
-    path  = require('path'),
-    build = require('./build'),
-    spawn = require('./spawn'),
+    nopt   = require('nopt'),
+    path   = require('path'),
+    iossim = require('ios-sim'),
+    build  = require('./build'),
+    spawn  = require('./spawn'),
     check_reqs = require('./check_reqs');
 
 var cordovaPath = path.join(__dirname, '..');
@@ -168,13 +169,8 @@ function deployToSim(appPath, target) {
 
 function startSim(appPath, target) {
     var logPath = path.join(cordovaPath, 'console.log');
-    var simArgs = ['launch', appPath,
-        '--devicetypeid', 'com.apple.CoreSimulator.SimDeviceType.' + target,
-        // We need to redirect simulator output here to use cordova/log command
-        // TODO: Is there any other way to get emulator's output to use in log command?
-        '--stderr', logPath, '--stdout', logPath,
-        '--exit'];
-    return spawn('ios-sim', simArgs);
+
+    return iossim.launch(appPath, 'com.apple.CoreSimulator.SimDeviceType.' + target, logPath, "--exit");
 }
 
 function listDevices() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org