From 3e0233478c5d9fb9f530d851507a449b63e0803f Mon Sep 17 00:00:00 2001 From: TsvetanMilanov Date: Thu, 23 Mar 2017 18:01:16 +0200 Subject: [PATCH] Fix stop application on iOS simulator We need to pass the project name instead of the app identifier to kill the application on the simulator. --- lib/common | 2 +- lib/services/livesync/ios-device-livesync-service.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/common b/lib/common index 85feb33fc7..f9990aa977 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 85feb33fc790878b7c13729cb3079b74266ff14e +Subproject commit f9990aa9779b2c4a5601071381f69a13b1f8e114 diff --git a/lib/services/livesync/ios-device-livesync-service.ts b/lib/services/livesync/ios-device-livesync-service.ts index 592880b476..a9b53cceac 100644 --- a/lib/services/livesync/ios-device-livesync-service.ts +++ b/lib/services/livesync/ios-device-livesync-service.ts @@ -62,7 +62,7 @@ class IOSLiveSyncService implements INativeScriptDeviceLiveSyncService { public async refreshApplication(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[], forceExecuteFullSync: boolean, projectData: IProjectData): Promise { if (forceExecuteFullSync) { - await this.restartApplication(deviceAppData); + await this.restartApplication(deviceAppData, projectData.projectName); return; } @@ -74,7 +74,7 @@ class IOSLiveSyncService implements INativeScriptDeviceLiveSyncService { let shouldRestart = _.some(otherFiles, (localToDevicePath: Mobile.ILocalToDevicePathData) => !this.$liveSyncProvider.canExecuteFastSync(localToDevicePath.getLocalPath(), projectData, deviceAppData.platform)); if (shouldRestart || (!this.$options.liveEdit && scriptFiles.length)) { - await this.restartApplication(deviceAppData); + await this.restartApplication(deviceAppData, projectData.projectName); return; } @@ -82,12 +82,12 @@ class IOSLiveSyncService implements INativeScriptDeviceLiveSyncService { this.liveEdit(scriptFiles); await this.reloadPage(deviceAppData, otherFiles); } else { - await this.restartApplication(deviceAppData); + await this.restartApplication(deviceAppData, projectData.projectName); } } - private async restartApplication(deviceAppData: Mobile.IDeviceAppData): Promise { - return this.device.applicationManager.restartApplication(deviceAppData.appIdentifier); + private async restartApplication(deviceAppData: Mobile.IDeviceAppData, appName: string): Promise { + return this.device.applicationManager.restartApplication(deviceAppData.appIdentifier, appName); } private async reloadPage(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[]): Promise {