Skip to content

Commit 1f1cce0

Browse files
Merge pull request #4461 from NativeScript/tachev/improve-simulator-logs
fix: start iOS simulator logs before starting the app
2 parents e55f74a + aa1d460 commit 1f1cce0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/common/mobile/ios/simulator/ios-simulator-application-manager.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ export class IOSSimulatorApplicationManager extends ApplicationManagerBase {
5858
waitForDebugger: true,
5959
args: "--nativescript-debug-brk",
6060
} : {};
61+
await this.setDeviceLogData(appData);
6162
const launchResult = await this.iosSim.startApplication(this.device.deviceInfo.identifier, appData.appId, options);
6263
const pid = getPidFromiOSSimulatorLogs(appData.appId, launchResult);
63-
await this.setDeviceLogData(appData, pid);
64+
this.$deviceLogProvider.setApplicationPidForDevice(this.device.deviceInfo.identifier, pid);
6465
if (appData.waitForDebugger) {
6566
this.attachNativeDebugger(appData.appId, pid);
6667
}
@@ -114,8 +115,7 @@ export class IOSSimulatorApplicationManager extends ApplicationManagerBase {
114115
}
115116
}
116117

117-
private async setDeviceLogData(appData: Mobile.IApplicationData, pid: string): Promise<void> {
118-
this.$deviceLogProvider.setApplicationPidForDevice(this.device.deviceInfo.identifier, pid);
118+
private async setDeviceLogData(appData: Mobile.IApplicationData): Promise<void> {
119119
this.$deviceLogProvider.setProjectNameForDevice(this.device.deviceInfo.identifier, appData.projectName);
120120

121121
if (!this.$options.justlaunch) {

0 commit comments

Comments
 (0)