From 745c8cba5d5b6c1a893528c92a9c2701fb6ef3bf Mon Sep 17 00:00:00 2001 From: fatme Date: Wed, 19 Jun 2019 09:21:32 +0300 Subject: [PATCH] fix: fix `tns deploy ios --justlaunch` when there are connected device and simulator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NativeScript CLI doesn't respect correctly the built application package when there are connected device and simulator. That is the reason why `tns deploy ios --path TestApp --provision NativeScriptDevProfile –justlaunch` throws the following error: ENOENT: no such file or directory, scandir '/Users/mivanova/Projects/TestApp/platforms/ios/build/Debug-iphonesimulator' --- lib/controllers/deploy-controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/controllers/deploy-controller.ts b/lib/controllers/deploy-controller.ts index f988ee9da5..1574926ea4 100644 --- a/lib/controllers/deploy-controller.ts +++ b/lib/controllers/deploy-controller.ts @@ -10,8 +10,8 @@ export class DeployController { const { buildData, deviceDescriptors } = data; const executeAction = async (device: Mobile.IDevice) => { - await this.$buildController.prepareAndBuild({ ...buildData, buildForDevice: !device.isEmulator }); - await this.$deviceInstallAppService.installOnDevice(device, buildData); + const packageFilePath = await this.$buildController.prepareAndBuild({ ...buildData, buildForDevice: !device.isEmulator }); + await this.$deviceInstallAppService.installOnDevice(device, { ...buildData, buildForDevice: !device.isEmulator }, packageFilePath); }; await this.$devicesService.execute(executeAction, (device: Mobile.IDevice) => _.some(deviceDescriptors, deviceDescriptor => deviceDescriptor.identifier === device.deviceInfo.identifier));