Skip to content

Commit 41bcfb9

Browse files
Fatme HavaluovaFatme Havaluova
authored andcommitted
PR comments
1 parent 37a1c9d commit 41bcfb9

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

lib/ios-sim.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ var fiber = Fiber(() => {
1616
fiber.run();
1717

1818
function getSimulator(): IFuture<ISimulator> {
19-
return (() => {
20-
let libraryPath = require("./iphone-simulator");
21-
let obj = new libraryPath.iPhoneSimulator();
22-
let simulator = obj.createSimulator().wait();
23-
return simulator;
24-
}).future<ISimulator>()();
19+
let libraryPath = require("./iphone-simulator");
20+
let obj = new libraryPath.iPhoneSimulator();
21+
return obj.createSimulator();
2522
}
2623

2724
global.publicApi = {};
@@ -64,7 +61,6 @@ Object.defineProperty(global.publicApi, "getInstalledApplications", {
6461
let simulator = getSimulator().wait();
6562
let installedApplications: IApplication[] = simulator.getInstalledApplications.apply(simulator, args).wait();
6663
let result = _.map(installedApplications, application => application.appIdentifier);
67-
console.log("RESULT!!!!! ", result);
6864
return result;
6965
}
7066
}

lib/iphone-simulator-common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ export function printDeviceLog(deviceId: string): void {
4343
let childProcess = require("child_process").spawn("tail", ['-f', '-n', '1', logFilePath]);
4444
if (childProcess.stdout) {
4545
childProcess.stdout.on("data", (data: NodeBuffer) => {
46-
console.log(data.toString());
46+
process.stdout.write(data.toString());
4747
});
4848
}
4949

5050
if (childProcess.stderr) {
5151
childProcess.stderr.on("data", (data: string) => {
52-
console.error(data.toString());
52+
process.stdout.write(data.toString());
5353
});
5454
}
5555
}

lib/iphone-simulator-xcode-6.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ export class XCode6Simulator extends iPhoneSimulatorBaseLib.IPhoneInteropSimulat
7373
return this.simctl.launch(deviceId, appIdentifier);
7474
}
7575

76-
public stopApplication(deviceId: string, appIdentifier: string): IFuture<string> {
76+
public stopApplication(deviceId: string, cfBundleExecutable: string): IFuture<string> {
7777
try {
78-
return childProcess.exec(`killall ${appIdentifier.split(".")[2]}.app`);
78+
return childProcess.exec(`killall ${cfBundleExecutable}.app`);
7979
} catch(e) {
80-
//this.$logger.trace("Unable to kill simulator: " + e);
8180
}
8281
}
8382

lib/iphone-simulator-xcode-7.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,10 @@ export class XCode7Simulator implements ISimulator {
110110
return this.simctl.launch(deviceId, appIdentifier);
111111
}
112112

113-
public stopApplication(deviceId: string, appIdentifier: string): IFuture<string> {
113+
public stopApplication(deviceId: string, cfBundleExecutable: string): IFuture<string> {
114114
try {
115-
return childProcess.exec(`killall ${appIdentifier.split(".")[2]}`, {skipError: true});
115+
return childProcess.exec(`killall ${cfBundleExecutable}`, {skipError: true});
116116
} catch(e) {
117-
//this.$logger.trace("Unable to kill simulator: " + e);
118117
}
119118
}
120119

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "1.0.17",
3+
"version": "1.0.19",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {

0 commit comments

Comments
 (0)