@@ -218,7 +218,10 @@ export class PlatformService implements IPlatformService {
218218
219219 var platformData = this . $platformsData . getPlatformData ( platform ) ;
220220
221+ var cachedDeviceOption = options . forDevice ;
222+ options . forDevice = true ;
221223 this . buildPlatform ( platform ) . wait ( ) ;
224+ options . forDevice = cachedDeviceOption ;
222225
223226 packageFile = this . getLatestApplicationPackageForDevice ( platformData ) . wait ( ) . packageName ;
224227 this . $logger . out ( "Using " , packageFile ) ;
@@ -262,7 +265,10 @@ export class PlatformService implements IPlatformService {
262265
263266 var platformData = this . $platformsData . getPlatformData ( platform ) ;
264267
268+ var cachedDeviceOption = options . forDevice ;
269+ options . forDevice = true ;
265270 this . buildPlatform ( platform ) . wait ( ) ;
271+ options . forDevice = cachedDeviceOption ;
266272
267273 // Get latest package that is produced from build
268274 var packageFile = this . getLatestApplicationPackageForDevice ( platformData ) . wait ( ) . packageName ;
@@ -287,10 +293,7 @@ export class PlatformService implements IPlatformService {
287293 emulatorServices . checkDependencies ( ) . wait ( ) ;
288294
289295 if ( ! options . availableDevices ) {
290- var cachedEmulatorOption = options . emulator ;
291- options . emulator = true ;
292296 this . buildPlatform ( platform ) . wait ( ) ;
293- options . emulator = cachedEmulatorOption ;
294297
295298 var packageFile = this . getLatestApplicationPackageForEmulator ( platformData ) . wait ( ) . packageName ;
296299 this . $logger . out ( "Using " , packageFile ) ;
0 commit comments