Skip to content

Commit 745c8cb

Browse files
committed
fix: fix tns deploy ios --justlaunch when there are connected device and simulator
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'
1 parent e5f9d45 commit 745c8cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/controllers/deploy-controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export class DeployController {
1010
const { buildData, deviceDescriptors } = data;
1111

1212
const executeAction = async (device: Mobile.IDevice) => {
13-
await this.$buildController.prepareAndBuild({ ...buildData, buildForDevice: !device.isEmulator });
14-
await this.$deviceInstallAppService.installOnDevice(device, buildData);
13+
const packageFilePath = await this.$buildController.prepareAndBuild({ ...buildData, buildForDevice: !device.isEmulator });
14+
await this.$deviceInstallAppService.installOnDevice(device, { ...buildData, buildForDevice: !device.isEmulator }, packageFilePath);
1515
};
1616

1717
await this.$devicesService.execute(executeAction, (device: Mobile.IDevice) => _.some(deviceDescriptors, deviceDescriptor => deviceDescriptor.identifier === device.deviceInfo.identifier));

0 commit comments

Comments
 (0)