Monthly Archives: March 2019

NativeScript 5.3 only offers a smaller number of fixes and features than usual; but is still well worth upgrading to.

The most interesting update (for me) is actually the Android V8 engine has been upgraded yet again, but this time to a version that offers some nice performance benefits. It is always nice when an upgrade will increase the speed of your app with just a rebuild of it.In addition some awesome work has been done on the iOS engine that should also result in a speed enhancement.

So just upgrading the runtimes to 5.3 should give you a faster app...

Important Depreciation Notice

In version 5.2 short imports have been depreciated; I do not know when they will no longer actually work; but basically things like require("http") are no long valid; you need to do require("tns-core-modules/http"). The primary reason for this is that webpacking requires the full path; and it has problems with short imports.

Core Modules

The core modules offers the following enhancements and fixes...

Resource ID on Android error fixed during NavigationWebview and TabView fixesIcons on Tabview and ActionBar should look betterView classes now have the missing .background* Style options.

iOS

CLI

HMR is no longer considered Beta; almost all critical issues with HMR are now resolved.Several debugger issues resolved

Updating NativeScript

To get updated; you first need to do:npm i -g nativescript@latest

That will get you the latest version of NativeScript CLI; once you have it; do a "tns --version" and verify it prints out "5.3.x". Then do a "tns doctor" to verify your environment is up to date and has all the newest support tools you need for a successful build.

To install Webpack & HMR support:npm i nativescript-dev-webpack@latest --save-devNote: you need to have nativescript-dev-webpack as a development dependency for HMR to work.

To install latest NativeScript Angular pluginnpm i nativescript-angular@latest --saveYou will then need to install the actual angular bits; which as of this post v6 is currently supported.

The addition of all the additional analytics/tracking to the CLI reminded me; you can disable it permanently; if you value your privacy by doing:tns usage-reporting disable && tns error-reporting disable

Known issues

Android Q is not supported properly; The fix is slated for 3.3.1

TNS frequently (for me at least) kills the build with "Error is: cp: cannot create directory " and to fix you have to reset your platforms. (This might be more plugin development related corner case)