NativeScript 6.0

Wow, a major update was just released today with NativeScript 6.0

It has some awesome features; but since it is a major bump this is when all the breaking changes come out to play. And we have some huge breaking changes in v6.0. The largest change is to remove the legacy build system.

Features

  • New Themes

Android Runtime:

  • AndroidX (breaking change)
  • Worker communication is using the original JSON method, which fixes data corruption issues with data being transferred from worker to main thread.
  • v8 - v7.5
  • Some more SBG Fixes

iOS Runtime

  • JavaScriptCore 12.3
  • Issues with Building application with newer versions of XCode resolved

Webpack

  • process is now no longer forced undefined.
  • No longer need all screens names ending with -page
  • All XML, CSS, SCSS, JS, TS is now included in app
  • Lots and Lots of bug fixes

CLI

  • Node < 10 is not recommended, and < 8 is unsupported
  • XCode < 10 is unsupported
  • TNS Migrate to update your app to 6.0 has been added
  • Lots of bug fixes and changes for full 6.0 support

Core Modules

  • textChange and checkedChange events now fire again in Core
  • Animation of Height/Width
  • New Tab / Bottom Nav components
  • Font Icon Support in Actionbar and Tabviews

Breaking Changes

Now for the fun part; as is the normal reason for a major bump in version is all the breaking changes; this version has a lot, I'll mention the top changes. If you are a plugin developer; some of these will have to be fixed before your plugin will work in 6.0.

  • AndroidApplication.currentContext is removed (use AndroidApplication.context)
  • view.observe has been remove (use view.on)
  • ios.getter has been removed - use property directly.
  • AndroidX support breaks many plugins
  • Application.start is removed (use Application.run)
  • builder.loadPage is removed (use createViewFromEntry)
  • dependency-observable file/class removed
  • showModal deprecated function versions have been removed
  • AndroidActivityCallbacks.onCreate has changed has added additional parameters

Breaking Change: Removal of Legacy and standardize on Webpack

This is one of the largest changes in NativeScript 6. They released 5.4 which made webpack as the standard build, and made legacy the obsolete build system. This made 5.4, a release which had lots of issues. In fact a large chunk of the 5.4's I had to re-enable legacy mode because 5.4 was just too broken to actually work the new webpack only mode. I have another blog post on how to have a side-by-side to help deal with this issue; if you are one of the lucky ones that run into 6.0 issue that are because of webpack. As time progresses, and the issues are ironed out -- the webpack only build does offer a lot of benefits -- but during the transition; it could be a bit dicey...

Some Known Issues:

  • (Webpack) Each workers will drastically increase the size of your application (Fix already in master)
  • (Webpack) Having Workers and HMR don't work properly (use --no-hmr flag)

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.