@@ -75,11 +75,11 @@ export class IOSApplicationManager extends ApplicationManagerBase {
75
75
}
76
76
77
77
public async startApplication ( appData : Mobile . IApplicationData ) : Promise < void > {
78
-
79
78
if ( ! await this . isApplicationInstalled ( appData . appId ) ) {
80
79
this . $errors . failWithoutHelp ( "Invalid application id: %s. All available application ids are: %s%s " , appData . appId , EOL , this . applicationsLiveSyncInfos . join ( EOL ) ) ;
81
80
}
82
81
82
+ await this . setDeviceLogData ( appData ) ;
83
83
await this . runApplicationCore ( appData ) ;
84
84
85
85
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 {
100
100
101
101
public async restartApplication ( appData : Mobile . IApplicationData ) : Promise < void > {
102
102
try {
103
- this . $deviceLogProvider . setProjectNameForDevice ( this . device . deviceInfo . identifier , appData . projectName ) ;
103
+ await this . setDeviceLogData ( appData ) ;
104
104
await this . stopApplication ( appData ) ;
105
105
await this . runApplicationCore ( appData ) ;
106
106
} catch ( err ) {
@@ -109,14 +109,17 @@ export class IOSApplicationManager extends ApplicationManagerBase {
109
109
}
110
110
}
111
111
112
- private async runApplicationCore ( appData : Mobile . IApplicationData ) : Promise < void > {
112
+ private async setDeviceLogData ( appData : Mobile . IApplicationData ) : Promise < void > {
113
113
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 } ] ) ;
115
114
if ( ! this . $options . justlaunch ) {
116
115
await this . startDeviceLog ( ) ;
117
116
}
118
117
}
119
118
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
+
120
123
@cache ( )
121
124
private async startDeviceLog ( ) : Promise < void > {
122
125
await this . device . openDeviceLogStream ( ) ;
0 commit comments