NativeScript: 3.1.x released

Looks like I was asleep at the wheel; according to NPM 3.1 was released late last week; and I totally missed it.   However, I am more on the ball today and saw that 3.1.1 was released today to fix some of the issues with 3.1.    So lets cover the changes in both 3.1 & 3.11

  • Android Chrome development tools now supports the Elements tab; this allows you to see what css is assigned to elements in the UI DOM.  Very nice feature!
  • Android snapshots can be generated on Linux and Mac.  This allows you to make a custom snapshot; snapshots will improve startup time; but they do have the downside of increasing the size of the APK a lot.
  • Android now support ABI splits on first build.
  • Profiling on Android, you can now enable a profiling to see what is taking time in your application.  The feature is also available in @next on iOS.
  • CLI has been improved to fix a lot of issues, including Node 8 / npm 5 support.
  • Several fixes for the SearchBar, and TextFields now have a maxLength property!

Upgrading (Core):

First of all to upgrade is done is a couple steps:
> npm install -g nativescript@latest
> npm install tns-core-modules@latest --save

Next try the new update command or you can manually run the commands below
> tns update

For Android:
> tns platform remove android
> tns platform add android@latest

For iOS
> tns platform remove ios
> tns platform add ios@latest

Then you can type tns info and verify that everything says 3.1.x

Common Issues:

  1. Plugins fails; this is a known issue do to the complete revamp of the lower levels of the core modules design.  Some plugins need a lot of changes to work in 3.x; so you will have to wait for the third party authors to get caught up (Even I'm not caught up).    My plugins site  http://plugins.nativescript.rocks should be listing both version v2 & v3 plugins separately so that you can easily find 3.x or 2.x plugins.
  2. TypeScript incompatibilities; you should be using 2.2 or later with v3.x of TNS
  3. A new  3.1 CSS issue with Background Color
  4. Android runtime can still crash randomly with No weak reference found. long standing unfixed bug...  Disabling screen transitions, seems to help resolve the issue.
  5. Webpack might have random issues in Android builds, you might need to to a tns platform clean android to fix occasionally
  6. Issue with upgrading applications on Android 6 & 7 see blog post on fix.

Leave a Reply

Your email address will not be published. Required fields are marked *