Skip to content

Commit 03ed474

Browse files
author
Vladimir Enchev
committed
deployOnEmulator() will call deployOnDevice()
with this.$options.emulator = true;
1 parent cac997e commit 03ed474

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

lib/services/platform-service.ts

+3-22
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ export class PlatformService implements IPlatformService {
457457
return (() => {
458458
this.installOnDevice(platform, buildConfig).wait();
459459
let action = (device: Mobile.IDevice) => device.applicationManager.startApplication(this.$projectData.projectId);
460+
console.log("HERE: " + this.$options.emulator)
460461
this.$devicesService.execute(action, this.getCanExecuteAction(platform)).wait();
461462
}).future<void>()();
462463
}
@@ -482,28 +483,8 @@ export class PlatformService implements IPlatformService {
482483
}
483484

484485
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);
507488
}
508489

509490
public validatePlatform(platform: string): void {

0 commit comments

Comments
 (0)