Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 1df5a96

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Don't fail when more than one ios devices are attached
1 parent 180b484 commit 1df5a96

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

commands/device/stop-application.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,8 @@ export class StopApplicationOnDeviceCommand implements ICommand {
1818
public execute(args: string[]): IFuture<void> {
1919
return (() => {
2020
this.$devicesServices.initialize({ deviceId: this.$options.device, skipInferPlatform: true, platform: args[1] }).wait();
21-
22-
if (this.$devicesServices.deviceCount > 1) {
23-
this.$errors.failWithoutHelp("More than one device found. Specify device explicitly with --device option.To discover device ID, use $%s device command.", this.$staticConfig.CLIENT_NAME.toLowerCase());
24-
}
25-
26-
let action = (device: Mobile.IDevice) => { return (() => device.applicationManager.stopApplication(args[0]).wait()).future<void>()(); };
21+
22+
let action = (device: Mobile.IDevice) => device.applicationManager.stopApplication(args[0]);
2723
this.$devicesServices.execute(action).wait();
2824
}).future<void>()();
2925
}

mobile/ios/ios-core.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,8 @@ export class GDBServer implements Mobile.IGDBServer {
10801080
constructor(private socket: any, // socket is fd on Windows and net.Socket on mac
10811081
private $injector: IInjector,
10821082
private $hostInfo: IHostInfo,
1083-
private $options: IOptions) {
1083+
private $options: IOptions,
1084+
private $logger: ILogger) {
10841085
if(this.$hostInfo.isWindows) {
10851086
let winSocket = this.$injector.resolve(WinSocket, {service: this.socket, format: 0});
10861087
this.socket = {
@@ -1151,6 +1152,7 @@ export class GDBServer implements Mobile.IGDBServer {
11511152

11521153
private send(packet: string): void {
11531154
let data = this.createData(packet);
1155+
this.$logger.trace(`GDB: sending ${data}`);
11541156
this.socket.write(data);
11551157
}
11561158

0 commit comments

Comments
 (0)