This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ import Future = require("fibers/future");
6
6
7
7
export class IOSSimulatorApplicationManager extends ApplicationManagerBase implements Mobile . IDeviceApplicationManager {
8
8
constructor ( private iosSim : any ,
9
- private identifier : string ) {
9
+ private identifier : string ,
10
+ private $options : ICommonOptions ) {
10
11
super ( ) ;
11
12
}
12
13
14
+ private deviceLoggingStarted = false ;
15
+
13
16
public getInstalledApplications ( ) : IFuture < string [ ] > {
14
17
return Future . fromResult ( this . iosSim . getInstalledApplications ( this . identifier ) ) ;
15
18
}
@@ -23,7 +26,14 @@ export class IOSSimulatorApplicationManager extends ApplicationManagerBase imple
23
26
}
24
27
25
28
public startApplication ( appIdentifier : string ) : IFuture < void > {
26
- return this . iosSim . startApplication ( this . identifier , appIdentifier ) ;
29
+ return ( ( ) => {
30
+ let launchResult = this . iosSim . startApplication ( this . identifier , appIdentifier ) . wait ( ) ;
31
+ if ( ! this . $options . justlaunch && ! this . deviceLoggingStarted ) {
32
+ this . deviceLoggingStarted = true ;
33
+ this . iosSim . printDeviceLog ( this . identifier , launchResult ) ;
34
+ }
35
+
36
+ } ) . future < void > ( ) ( ) ;
27
37
}
28
38
29
39
public stopApplication ( cfBundleExecutable : string ) : IFuture < void > {
You can’t perform that action at this time.
0 commit comments