Skip to content

Commit f07f0fe

Browse files
committed
Give some time to simctl launch command to launch the process and all related processes and services
Trying to fix NativeScript/nativescript-cli#3235
1 parent 5153663 commit f07f0fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/iphone-simulator-xcode-simctl.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
8989
}
9090

9191
public startApplication(deviceId: string, appIdentifier: string): string {
92-
return this.simctl.launch(deviceId, appIdentifier);
92+
// simctl launch command does not launch the process immediately and we have to wait a little bit,
93+
// just to ensure all related processes and services are alive.
94+
const launchResult = this.simctl.launch(deviceId, appIdentifier);
95+
utils.sleep(0.5);
96+
return launchResult;
9397
}
9498

9599
public stopApplication(deviceId: string, appIdentifier: string, bundleExecutable: string): string {

0 commit comments

Comments
 (0)