diff --git a/lib/common b/lib/common index 0a554b1dbc..1687c9925d 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 0a554b1dbc3f29fa6e229aabfa444d59a4ea6ce2 +Subproject commit 1687c9925db6fbd444fc5c21cfe8b511013d6292 diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 6f44946680..963ea34555 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -178,7 +178,6 @@ export class PlatformService implements IPlatformService { return (() => { platform = platform.toLowerCase(); - this.preparePlatform(platform).wait(); if (options.emulator) { this.deployOnEmulator(platform).wait(); } else { @@ -194,7 +193,7 @@ export class PlatformService implements IPlatformService { ? this.debugOnEmulator(platform) : this.debugOnDevice(platform); - return ret; + return ret; } public debugOnEmulator(platform: string): IFuture { @@ -210,13 +209,10 @@ export class PlatformService implements IPlatformService { public debugOnDevice(platform: string): IFuture { return (() => { platform = platform.toLowerCase(); - var platformData = this.$platformsData.getPlatformData(platform); var packageFile = ""; var platformData = this.$platformsData.getPlatformData(platform); if (options["debug-brk"]) { - this.preparePlatform(platform).wait(); - var cachedDeviceOption = options.forDevice; options.forDevice = true; this.buildPlatform(platform).wait(); @@ -276,7 +272,13 @@ export class PlatformService implements IPlatformService { this.$logger.out("Using ", packageFile); this.$devicesServices.initialize({platform: platform, deviceId: options.device}).wait(); - var action = (device: Mobile.IDevice): IFuture => { return device.deploy(packageFile, this.$projectData.projectId); }; + var action = (device: Mobile.IDevice): IFuture => { + return (() => { + device.deploy(packageFile, this.$projectData.projectId).wait(); + device.runApplication(this.$projectData.projectId).wait(); + + }).future()(); + }; this.$devicesServices.execute(action).wait(); }).future()();