@@ -457,6 +457,7 @@ export class PlatformService implements IPlatformService {
457
457
return ( ( ) => {
458
458
this . installOnDevice ( platform , buildConfig ) . wait ( ) ;
459
459
let action = ( device : Mobile . IDevice ) => device . applicationManager . startApplication ( this . $projectData . projectId ) ;
460
+ console . log ( "HERE: " + this . $options . emulator )
460
461
this . $devicesService . execute ( action , this . getCanExecuteAction ( platform ) ) . wait ( ) ;
461
462
} ) . future < void > ( ) ( ) ;
462
463
}
@@ -482,28 +483,8 @@ export class PlatformService implements IPlatformService {
482
483
}
483
484
484
485
public deployOnEmulator ( platform : string , buildConfig ?: IBuildConfig ) : IFuture < void > {
485
- return ( ( ) => {
486
- let packageFile : string , logFilePath : string ;
487
- this . ensurePlatformInstalled ( platform ) . wait ( ) ;
488
- platform = platform . toLowerCase ( ) ;
489
-
490
- let platformData = this . $platformsData . getPlatformData ( platform ) ;
491
- let emulatorServices = platformData . emulatorServices ;
492
-
493
- emulatorServices . checkAvailability ( ) . wait ( ) ;
494
- emulatorServices . checkDependencies ( ) . wait ( ) ;
495
-
496
- if ( ! this . $options . availableDevices ) {
497
- this . buildPlatform ( platform , buildConfig ) . wait ( ) ;
498
-
499
- packageFile = this . getLatestApplicationPackageForEmulator ( platformData ) . wait ( ) . packageName ;
500
- this . $logger . out ( "Using " , packageFile ) ;
501
-
502
- logFilePath = path . join ( platformData . projectRoot , this . $projectData . projectName , "emulator.log" ) ;
503
- }
504
-
505
- emulatorServices . runApplicationOnEmulator ( packageFile , { stderrFilePath : logFilePath , stdoutFilePath : logFilePath , appId : this . $projectData . projectId } ) . wait ( ) ;
506
- } ) . future < void > ( ) ( ) ;
486
+ this . $options . emulator = true ;
487
+ return this . deployOnDevice ( platform , buildConfig ) ;
507
488
}
508
489
509
490
public validatePlatform ( platform : string ) : void {
0 commit comments