From 72e996e46e76af17a8d9a4c016ab32524dd6e05e Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 17 Jun 2019 16:29:20 +0300 Subject: [PATCH 1/4] docs: update changelog for 5.4.1 release --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6bbc55c1..9bc71cd04a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ NativeScript CLI Changelog ================ +5.4.1 (2019, June 17) +== + +### Fixed +* [Fixed #4226](https://github.com/NativeScript/nativescript-cli/issues/4226): Slowly attaching to debugger on real iOS device with bundle +* [Fixed #4584](https://github.com/NativeScript/nativescript-cli/issues/4584): Invalid App Store Icon Error, while uploading an iOS app with CLI generated icons +* [Fixed #4608](https://github.com/NativeScript/nativescript-cli/issues/4608): Misleading message for min runtime version +* [Fixed #4664](https://github.com/NativeScript/nativescript-cli/pull/4664): `tns cloud run...` command does not respect useLegacyWorkflow flag +* [Fixed #4665](https://github.com/NativeScript/nativescript-cli/issues/4665): Incorrect error is shown when unsupported Node.js version is used +* [Fixed #4664](https://github.com/NativeScript/nativescript-cli/pull/4679): `$logger` fails to print null objects +* [Fixed #4665](https://github.com/NativeScript/nativescript-cli/issues/4701): Deprecate support for `tns init` command + 5.4.0 (2019, May 15) == From 5d79aeb2ca27ab15758729161632ff1f8bee0951 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 17 Jun 2019 18:12:17 +0300 Subject: [PATCH 2/4] fix: hmr for iOS does not work on Windows With `tns cloud run ...` command (or with NativeScript Sidekick), you can use LiveSync on iOS device from Windows machine (with application built in the cloud). However, this approach does not work when the iOS device does not have developer disk image mounted (i.e. it has not been used on macOS). The problem is that during establishment of socket connection, CLI tries to start the application. This is a precautions for cases when the application had crashed. In most of the cases when we reach to this code, the application is already up and running. However, calling `startApplication` fails on Windows and we never setup the socket connection. So the HMR does not work at all. Fix this by adding a try-catch block around starting of application when trying to setup the socket connection. --- lib/common/mobile/ios/device/ios-device.ts | 1 + lib/common/mobile/ios/ios-device-base.ts | 9 +++++++-- lib/common/mobile/ios/simulator/ios-simulator-device.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/common/mobile/ios/device/ios-device.ts b/lib/common/mobile/ios/device/ios-device.ts index e10a589114..3e75d06f8b 100644 --- a/lib/common/mobile/ios/device/ios-device.ts +++ b/lib/common/mobile/ios/device/ios-device.ts @@ -18,6 +18,7 @@ export class IOSDevice extends IOSDeviceBase { private $injector: IInjector, protected $iOSDebuggerPortService: IIOSDebuggerPortService, protected $deviceLogProvider: Mobile.IDeviceLogProvider, + protected $logger: ILogger, protected $lockService: ILockService, private $iOSSocketRequestExecutor: IiOSSocketRequestExecutor, private $devicePlatformsConstants: Mobile.IDevicePlatformsConstants, diff --git a/lib/common/mobile/ios/ios-device-base.ts b/lib/common/mobile/ios/ios-device-base.ts index 62be589cfc..302f7d4112 100644 --- a/lib/common/mobile/ios/ios-device-base.ts +++ b/lib/common/mobile/ios/ios-device-base.ts @@ -7,6 +7,7 @@ export abstract class IOSDeviceBase implements Mobile.IiOSDevice { protected abstract $deviceLogProvider: Mobile.IDeviceLogProvider; protected abstract $iOSDebuggerPortService: IIOSDebuggerPortService; protected abstract $lockService: ILockService; + protected abstract $logger: ILogger; abstract deviceInfo: Mobile.IDeviceInfo; abstract applicationManager: Mobile.IDeviceApplicationManager; abstract fileSystem: Mobile.IDeviceFileSystem; @@ -22,8 +23,12 @@ export abstract class IOSDeviceBase implements Mobile.IiOSDevice { } await this.attachToDebuggerFoundEvent(appId, projectName); - if (ensureAppStarted) { - await this.applicationManager.startApplication({ appId, projectName }); + try { + if (ensureAppStarted) { + await this.applicationManager.startApplication({ appId, projectName }); + } + } catch (err) { + this.$logger.trace(`Unable to start application ${appId} on device ${this.deviceInfo.identifier} in getDebugSocket method. Error is: ${err}`); } this.cachedSockets[appId] = await this.getDebugSocketCore(appId); diff --git a/lib/common/mobile/ios/simulator/ios-simulator-device.ts b/lib/common/mobile/ios/simulator/ios-simulator-device.ts index 50a178d4f3..e6b6cbf02b 100644 --- a/lib/common/mobile/ios/simulator/ios-simulator-device.ts +++ b/lib/common/mobile/ios/simulator/ios-simulator-device.ts @@ -22,7 +22,7 @@ export class IOSSimulator extends IOSDeviceBase implements Mobile.IiOSDevice { private $iOSEmulatorServices: Mobile.IiOSSimulatorService, private $iOSNotification: IiOSNotification, private $iOSSimulatorLogProvider: Mobile.IiOSSimulatorLogProvider, - private $logger: ILogger) { + protected $logger: ILogger) { super(); this.applicationManager = this.$injector.resolve(applicationManagerPath.IOSSimulatorApplicationManager, { iosSim: this.$iOSSimResolver.iOSSim, device: this }); this.fileSystem = this.$injector.resolve(fileSystemPath.IOSSimulatorFileSystem, { iosSim: this.$iOSSimResolver.iOSSim }); From cbb8ac83c691dd86e52a64d5281c88af64c1b6be Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 17 Jun 2019 18:17:46 +0300 Subject: [PATCH 3/4] chore: set version to 5.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93304186f6..59f557644b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nativescript", "preferGlobal": true, - "version": "5.4.1", + "version": "5.4.2", "author": "Telerik ", "description": "Command-line interface for building NativeScript projects", "bin": { From df406f70d0847f0ce8c21eaa4155e614e82bb631 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Wed, 19 Jun 2019 11:10:43 +0300 Subject: [PATCH 4/4] docs: update Changelog for 5.4.2 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bc71cd04a..dbbeea8c5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ NativeScript CLI Changelog ================ +5.4.2 (2019, June 19) +== + +### Fixed +* [Fixed #4732](https://github.com/NativeScript/nativescript-cli/pull/4732): HMR does not work with `tns cloud run ios ...` on Windows + + 5.4.1 (2019, June 17) ==