@@ -348,7 +348,8 @@ export class PlatformService implements IPlatformService {
348
348
return ( ( ) => {
349
349
let shouldBuild = this . preparePlatform ( platform , false ) . wait ( ) ;
350
350
let platformData = this . $platformsData . getPlatformData ( platform ) ;
351
- let buildInfoFile = path . join ( platformData . projectRoot , buildInfoFileName ) ;
351
+ let buildInfoFilePath = this . getBuildOutputPath ( platform , platformData , buildConfig ) ;
352
+ let buildInfoFile = path . join ( buildInfoFilePath , buildInfoFileName ) ;
352
353
if ( ! shouldBuild ) {
353
354
if ( this . $fs . exists ( buildInfoFile ) . wait ( ) ) {
354
355
let buildInfoText = this . $fs . readText ( buildInfoFile ) . wait ( ) ;
@@ -364,6 +365,14 @@ export class PlatformService implements IPlatformService {
364
365
} ) . future < void > ( ) ( ) ;
365
366
}
366
367
368
+ private getBuildOutputPath ( platform : string , platformData : IPlatformData , buildConfig ?: IBuildConfig ) : string {
369
+ let buildForDevice = buildConfig ? buildConfig . buildForDevice : false ;
370
+ if ( platform === this . $devicePlatformsConstants . iOS . toLowerCase ( ) ) {
371
+ return buildForDevice ? platformData . deviceBuildOutputPath : platformData . emulatorBuildOutputPath ;
372
+ }
373
+ return platformData . deviceBuildOutputPath ;
374
+ }
375
+
367
376
public buildForDeploy ( platform : string , buildConfig ?: IBuildConfig ) : IFuture < void > {
368
377
return ( ( ) => {
369
378
platform = platform . toLowerCase ( ) ;
@@ -467,7 +476,7 @@ export class PlatformService implements IPlatformService {
467
476
} else {
468
477
let deviceBuildConfig = buildConfig || { } ;
469
478
deviceBuildConfig . buildForDevice = true ;
470
- this . prepareAndBuild ( platform , buildConfig ) . wait ( ) ;
479
+ this . prepareAndBuild ( platform , deviceBuildConfig ) . wait ( ) ;
471
480
packageFile = this . getLatestApplicationPackageForDevice ( platformData ) . wait ( ) . packageName ;
472
481
}
473
482
}
0 commit comments