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

Commit 01cb744

Browse files
Merge pull request #1080 from telerik/vladimirov/fix-ios-logs-cloud
fix(logs): Logs from iOS device are not shown on Windows
2 parents f325d78 + 37910d4 commit 01cb744

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mobile/ios/device/ios-application-manager.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ export class IOSApplicationManager extends ApplicationManagerBase {
7575
}
7676

7777
public async startApplication(appData: Mobile.IApplicationData): Promise<void> {
78-
7978
if (!await this.isApplicationInstalled(appData.appId)) {
8079
this.$errors.failWithoutHelp("Invalid application id: %s. All available application ids are: %s%s ", appData.appId, EOL, this.applicationsLiveSyncInfos.join(EOL));
8180
}
8281

82+
await this.setDeviceLogData(appData);
8383
await this.runApplicationCore(appData);
8484

8585
this.$logger.info(`Successfully run application ${appData.appId} on device with ID ${this.device.deviceInfo.identifier}.`);
@@ -100,7 +100,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
100100

101101
public async restartApplication(appData: Mobile.IApplicationData): Promise<void> {
102102
try {
103-
this.$deviceLogProvider.setProjectNameForDevice(this.device.deviceInfo.identifier, appData.projectName);
103+
await this.setDeviceLogData(appData);
104104
await this.stopApplication(appData);
105105
await this.runApplicationCore(appData);
106106
} catch (err) {
@@ -109,14 +109,17 @@ export class IOSApplicationManager extends ApplicationManagerBase {
109109
}
110110
}
111111

112-
private async runApplicationCore(appData: Mobile.IApplicationData): Promise<void> {
112+
private async setDeviceLogData(appData: Mobile.IApplicationData): Promise<void> {
113113
this.$deviceLogProvider.setProjectNameForDevice(this.device.deviceInfo.identifier, appData.projectName);
114-
await this.$iosDeviceOperations.start([{ deviceId: this.device.deviceInfo.identifier, appId: appData.appId, ddi: this.$options.ddi }]);
115114
if (!this.$options.justlaunch) {
116115
await this.startDeviceLog();
117116
}
118117
}
119118

119+
private async runApplicationCore(appData: Mobile.IApplicationData): Promise<void> {
120+
await this.$iosDeviceOperations.start([{ deviceId: this.device.deviceInfo.identifier, appId: appData.appId, ddi: this.$options.ddi }]);
121+
}
122+
120123
@cache()
121124
private async startDeviceLog(): Promise<void> {
122125
await this.device.openDeviceLogStream();

0 commit comments

Comments
 (0)