From 7f51eab0d6b14141c534d206b993fcd68468c5a8 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:34:19 +0200 Subject: [PATCH 01/20] remove wrong comment about default emulator --- bin/templates/scripts/cordova/lib/run.js | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index f9e57616c..7fe271e62 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -174,7 +174,6 @@ function deployToDevice (appPath, target, extraArgs) { * @return {Promise} Resolves when deploy succeeds otherwise rejects */ function deployToSim (appPath, target) { - // Select target device for emulator. Default is 'iPhone-6' if (!target) { return require('./list-emulator-images').run() .then(function (emulators) { From 558224ac43627af1a1624023dc104180583be8a3 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:34:52 +0200 Subject: [PATCH 02/20] add logging about deployment --- bin/templates/scripts/cordova/lib/run.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 7fe271e62..39d097c50 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -159,6 +159,7 @@ function checkDeviceConnected () { * @return {Promise} Resolves when deploy succeeds otherwise rejects */ function deployToDevice (appPath, target, extraArgs) { + events.emit('log', 'Deploying to device'); // Deploying to device... if (target) { return superspawn.spawn('ios-deploy', ['--justlaunch', '-d', '-b', appPath, '-i', target].concat(extraArgs), { printCommand: true, stdio: 'inherit' }); @@ -174,6 +175,7 @@ function deployToDevice (appPath, target, extraArgs) { * @return {Promise} Resolves when deploy succeeds otherwise rejects */ function deployToSim (appPath, target) { + events.emit('log', 'Deploying to simulator'); if (!target) { return require('./list-emulator-images').run() .then(function (emulators) { From fbcbf99c397161cdd82e8faf9ddd4a29678a8c97 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:35:06 +0200 Subject: [PATCH 03/20] add comment back, minus wrong default --- bin/templates/scripts/cordova/lib/run.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 39d097c50..c37cebf12 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -177,6 +177,7 @@ function deployToDevice (appPath, target, extraArgs) { function deployToSim (appPath, target) { events.emit('log', 'Deploying to simulator'); if (!target) { + // Select target device for emulator return require('./list-emulator-images').run() .then(function (emulators) { if (emulators.length > 0) { From 9cf91b29de36b565ac3972f82927ab556345b5c7 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:35:16 +0200 Subject: [PATCH 04/20] quote target string --- bin/templates/scripts/cordova/lib/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index c37cebf12..950176a02 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -188,7 +188,7 @@ function deployToSim (appPath, target) { target = emulator; } }); - events.emit('log', 'No target specified for emulator. Deploying to ' + target + ' simulator'); + events.emit('log', 'No target specified for emulator. Deploying to "' + target + '" simulator'); return startSim(appPath, target); }); } else { From 82662378896f1cfd1c17286e7b1672c8c3694353 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:35:44 +0200 Subject: [PATCH 05/20] log simulator start command --- bin/templates/scripts/cordova/lib/run.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 950176a02..1bc8c16ee 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -202,9 +202,13 @@ function startSim (appPath, target) { return iossimLaunch(appPath, 'com.apple.CoreSimulator.SimDeviceType.' + target, logPath, '--exit'); } -function iossimLaunch (app_path, devicetypeid, log, exit) { +function iossimLaunch (appPath, devicetypeid, log, exit) { var f = path.resolve(path.dirname(require.resolve('ios-sim')), 'bin', 'ios-sim'); - var proc = cp.spawn(f, ['launch', app_path, '--devicetypeid', devicetypeid, '--log', log, exit]); + + var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit]; + console.log("$ " + f + params.join(' ')); + var proc = cp.spawn(f, params); + proc.stdout.on('data', (data) => { console.log(data.toString()); }); From 6e8d114050595fbdceb3357ce3d2f32dde9bb9bc Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:36:02 +0200 Subject: [PATCH 06/20] prefix log from simulator to make it recognizable --- bin/templates/scripts/cordova/lib/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 1bc8c16ee..792e0bfda 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -210,7 +210,7 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { var proc = cp.spawn(f, params); proc.stdout.on('data', (data) => { - console.log(data.toString()); + console.log("Data from simulator: " + data.toString()); }); } From 1d1bd3df81fd6c1bf487e24a0b4e936578fa2b14 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 19:50:11 +0200 Subject: [PATCH 07/20] add missing space in command logging --- bin/templates/scripts/cordova/lib/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 792e0bfda..b9fbd5e90 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -206,7 +206,7 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { var f = path.resolve(path.dirname(require.resolve('ios-sim')), 'bin', 'ios-sim'); var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit]; - console.log("$ " + f + params.join(' ')); + console.log("$ " + f + ' ' + params.join(' ')); var proc = cp.spawn(f, params); proc.stdout.on('data', (data) => { From bd678f221a9d9a5abdaa01d62764bcfc1031297e Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 20:58:22 +0200 Subject: [PATCH 08/20] fix log prefix (data comes from ios-sim, not simulator) --- bin/templates/scripts/cordova/lib/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index b9fbd5e90..2bfc37645 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -210,7 +210,7 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { var proc = cp.spawn(f, params); proc.stdout.on('data', (data) => { - console.log("Data from simulator: " + data.toString()); + console.log("ios-sim log: " + data.toString()); }); } From 83bd3f8921dd6d3ef1e7788c2c43a4e942be9fc1 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 20:58:37 +0200 Subject: [PATCH 09/20] use patched ios-sim with additional output --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c43b97c7a..f46504606 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "cordova-common": "^3.1.0", - "ios-sim": "^8.0.1", + "ios-sim": "github:janpio/ios-sim#patch-1", "nopt": "^4.0.1", "plist": "^3.0.1", "q": "^1.5.1", From d6fb2a47adb66c3afa8b88e519907c08a0c1e593 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 21:10:21 +0200 Subject: [PATCH 10/20] fix package.json maybe? --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f46504606..23eebcb7b 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "cordova-common": "^3.1.0", - "ios-sim": "github:janpio/ios-sim#patch-1", + "ios-sim": "janpio/ios-sim#patch-1", "nopt": "^4.0.1", "plist": "^3.0.1", "q": "^1.5.1", From 3634475b772dbbb329c7999a156c9c5c9efe7b72 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sat, 13 Apr 2019 21:15:28 +0200 Subject: [PATCH 11/20] switch to janpio/ios-sim#802 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23eebcb7b..3dd950d39 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "cordova-common": "^3.1.0", - "ios-sim": "janpio/ios-sim#patch-1", + "ios-sim": "github:janpio/ios-sim#802", "nopt": "^4.0.1", "plist": "^3.0.1", "q": "^1.5.1", From ff8e53a9eb3dbd39ed198e4ddbc89e7b0f004c1b Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sun, 14 Apr 2019 02:34:22 +0200 Subject: [PATCH 12/20] better logging about target --- bin/templates/scripts/cordova/lib/build.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js index 4270c4769..79e5dae75 100644 --- a/bin/templates/scripts/cordova/lib/build.js +++ b/bin/templates/scripts/cordova/lib/build.js @@ -160,12 +160,12 @@ module.exports.run = function (buildOpts) { if (!theTarget) { return getDefaultSimulatorTarget().then(function (defaultTarget) { emulatorTarget = defaultTarget.name; - events.emit('log', 'Building for ' + emulatorTarget + ' Simulator'); + events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + theTarget.identifier + ', ' + theTarget.simIdentifier + ')'); return emulatorTarget; }); } else { emulatorTarget = theTarget.name; - events.emit('log', 'Building for ' + emulatorTarget + ' Simulator'); + events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + theTarget.identifier + ', ' + theTarget.simIdentifier + ')'); return emulatorTarget; } }); @@ -217,6 +217,7 @@ module.exports.run = function (buildOpts) { events.emit('log', 'Building project: ' + path.join(projectPath, projectName + '.xcworkspace')); events.emit('log', '\tConfiguration: ' + configuration); events.emit('log', '\tPlatform: ' + (buildOpts.device ? 'device' : 'emulator')); + events.emit('log', '\tTarget: ' + emulatorTarget); var buildOutputDir = path.join(projectPath, 'build', (buildOpts.device ? 'device' : 'emulator')); From c632359c4a4b10d67b4a9e290616f361c9bf09ee Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sun, 14 Apr 2019 02:42:09 +0200 Subject: [PATCH 13/20] fix --- bin/templates/scripts/cordova/lib/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js index 79e5dae75..3ca59369f 100644 --- a/bin/templates/scripts/cordova/lib/build.js +++ b/bin/templates/scripts/cordova/lib/build.js @@ -160,7 +160,7 @@ module.exports.run = function (buildOpts) { if (!theTarget) { return getDefaultSimulatorTarget().then(function (defaultTarget) { emulatorTarget = defaultTarget.name; - events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + theTarget.identifier + ', ' + theTarget.simIdentifier + ')'); + events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + defaultTarget.identifier + ', ' + defaultTarget.simIdentifier + ')'); return emulatorTarget; }); } else { From ce4fbc7ebe3f24d7d6af2696bf692bf0c7010b69 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sun, 14 Apr 2019 17:39:22 +0200 Subject: [PATCH 14/20] fix eslint stuff --- bin/templates/scripts/cordova/lib/run.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 2bfc37645..3759b821a 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -204,13 +204,13 @@ function startSim (appPath, target) { function iossimLaunch (appPath, devicetypeid, log, exit) { var f = path.resolve(path.dirname(require.resolve('ios-sim')), 'bin', 'ios-sim'); - + var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit]; - console.log("$ " + f + ' ' + params.join(' ')); + console.log('$ ' + f + ' ' + params.join(' ')); var proc = cp.spawn(f, params); - + proc.stdout.on('data', (data) => { - console.log("ios-sim log: " + data.toString()); + console.log('ios-sim log: ' + data.toString()); }); } From e1f2b905554cebba0752e99d14e0813c1c4cfd54 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Tue, 16 Apr 2019 17:01:42 +0200 Subject: [PATCH 15/20] try to use superspawn instead of cp --- bin/templates/scripts/cordova/lib/run.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 3759b821a..9ce1cb350 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -207,11 +207,19 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit]; console.log('$ ' + f + ' ' + params.join(' ')); - var proc = cp.spawn(f, params); - proc.stdout.on('data', (data) => { - console.log('ios-sim log: ' + data.toString()); - }); + return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'inherit' }) + .progress(function (stdio) { + if (stdio.stderr) { + console.error(stdio.stderr); + } + if (stdio.stdout) { + console.log('ios-sim log: ' + data.toString()); + } + }) + .then(function(result){ + console.log('Simulator successfully started via `ios-sim`.'); + }); } function listDevices () { From 2a075c6908634aadb5715827eaa105e7e8e51737 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Tue, 16 Apr 2019 17:16:27 +0200 Subject: [PATCH 16/20] stdio=pipe --- bin/templates/scripts/cordova/lib/run.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 9ce1cb350..e0da41e6c 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -204,11 +204,9 @@ function startSim (appPath, target) { function iossimLaunch (appPath, devicetypeid, log, exit) { var f = path.resolve(path.dirname(require.resolve('ios-sim')), 'bin', 'ios-sim'); - var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit]; - console.log('$ ' + f + ' ' + params.join(' ')); - return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'inherit' }) + return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'pipe' }) .progress(function (stdio) { if (stdio.stderr) { console.error(stdio.stderr); From 085695b73bc41e4f7faa1de0237bc7f6b1642a6e Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Tue, 16 Apr 2019 17:21:58 +0200 Subject: [PATCH 17/20] iterate --- bin/templates/scripts/cordova/lib/run.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index e0da41e6c..d59d73442 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -19,7 +19,6 @@ var Q = require('q'); var path = require('path'); -var cp = require('child_process'); var build = require('./build'); var shell = require('shelljs'); var superspawn = require('cordova-common').superspawn; @@ -208,15 +207,15 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'pipe' }) .progress(function (stdio) { - if (stdio.stderr) { - console.error(stdio.stderr); + if (stdio.stderr) { + console.error(stdio.stderr); } if (stdio.stdout) { - console.log('ios-sim log: ' + data.toString()); + console.log('ios-sim log: ' + stdio.stdout); } }) - .then(function(result){ - console.log('Simulator successfully started via `ios-sim`.'); + .then(function (result) { + console.log('Simulator successfully started via `ios-sim`.', result); }); } From 894f06468ac0c623942d527111e2e11d9ca9a68a Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Tue, 16 Apr 2019 18:15:08 +0200 Subject: [PATCH 18/20] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3dd950d39..c43b97c7a 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "cordova-common": "^3.1.0", - "ios-sim": "github:janpio/ios-sim#802", + "ios-sim": "^8.0.1", "nopt": "^4.0.1", "plist": "^3.0.1", "q": "^1.5.1", From 1420f2f543cf52f0807028a12bea16d99eec3441 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Wed, 17 Apr 2019 18:03:16 +0200 Subject: [PATCH 19/20] review feedback --- bin/templates/scripts/cordova/lib/run.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index d59d73442..0323e5f1c 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -205,17 +205,17 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { var f = path.resolve(path.dirname(require.resolve('ios-sim')), 'bin', 'ios-sim'); var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit]; - return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'pipe' }) + return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true }) .progress(function (stdio) { if (stdio.stderr) { - console.error(stdio.stderr); + console.error('ios-sim: ' + stdio.stderr); } if (stdio.stdout) { - console.log('ios-sim log: ' + stdio.stdout); + events.emit('log', 'ios-sim: ' + stdio.stdout.trim()); } }) .then(function (result) { - console.log('Simulator successfully started via `ios-sim`.', result); + events.emit('log', 'Simulator successfully started via `ios-sim`.'); }); } From 55216be494730a0c45844c97589b75e28910ec2f Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Wed, 17 Apr 2019 10:25:35 -0700 Subject: [PATCH 20/20] Minor improvements to logging --- bin/templates/scripts/cordova/lib/build.js | 5 +++-- bin/templates/scripts/cordova/lib/run.js | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js index 3ca59369f..7a36c0673 100644 --- a/bin/templates/scripts/cordova/lib/build.js +++ b/bin/templates/scripts/cordova/lib/build.js @@ -160,12 +160,13 @@ module.exports.run = function (buildOpts) { if (!theTarget) { return getDefaultSimulatorTarget().then(function (defaultTarget) { emulatorTarget = defaultTarget.name; - events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + defaultTarget.identifier + ', ' + defaultTarget.simIdentifier + ')'); + events.emit('warn', `No simulator found for "${newTarget}. Falling back to the default target.`); + events.emit('log', `Building for "${emulatorTarget}" Simulator (${defaultTarget.identifier}, ${defaultTarget.simIdentifier}).`); return emulatorTarget; }); } else { emulatorTarget = theTarget.name; - events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + theTarget.identifier + ', ' + theTarget.simIdentifier + ')'); + events.emit('log', `Building for "${emulatorTarget}" Simulator (${theTarget.identifier}, ${theTarget.simIdentifier}).`); return emulatorTarget; } }); diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js index 0323e5f1c..f21fee69b 100644 --- a/bin/templates/scripts/cordova/lib/run.js +++ b/bin/templates/scripts/cordova/lib/run.js @@ -187,7 +187,7 @@ function deployToSim (appPath, target) { target = emulator; } }); - events.emit('log', 'No target specified for emulator. Deploying to "' + target + '" simulator'); + events.emit('log', `No target specified for emulator. Deploying to "${target}" simulator.`); return startSim(appPath, target); }); } else { @@ -208,10 +208,10 @@ function iossimLaunch (appPath, devicetypeid, log, exit) { return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true }) .progress(function (stdio) { if (stdio.stderr) { - console.error('ios-sim: ' + stdio.stderr); + events.emit('error', `[ios-sim] ${stdio.stderr}`); } if (stdio.stdout) { - events.emit('log', 'ios-sim: ' + stdio.stdout.trim()); + events.emit('log', `[ios-sim] ${stdio.stdout.trim()}`); } }) .then(function (result) {