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/09 06:01:07 UTC
ios commit: CB-9328 Use ios-sim as a node module, not a CLI utility
Repository: cordova-ios
Updated Branches:
refs/heads/CB-9328 [created] 3663e6ac6
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/3663e6ac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3663e6ac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3663e6ac
Branch: refs/heads/CB-9328
Commit: 3663e6ac6a39a13c33adab64e38a326b27d5e84b
Parents: 0f571e3
Author: Simon MacDonald <si...@gmail.com>
Authored: Wed Sep 9 00:00:09 2015 -0400
Committer: Simon MacDonald <si...@gmail.com>
Committed: Wed Sep 9 00:00: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/3663e6ac/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