Some of the new features
- NativeScript Workers
- Per-Side borders
- Flexbox layout
- Android Snapshots on Release build (faster app start time)
- Added "import" to point to the JS file
- More pseudo selectors: button now supports: pressed, active and highlighted, and views descendants support disabled.
- Segmented Bar now has a new css property: selected-background-color
- TabView now has new CSS properies: tabTextColor, tabBackgroundColor, selectedTabTextColor, and androidSelectedTabHighlightedColor
- Some CSS properties now support % sizes: height, width, margin-left, margin-top, margin-right, margin-bottom, margin.
- Image Capture allows rotation.
- Camera module now a plugin (Removes a permission)
- Brand new Theme!
- Reduce the size of the Android App
- Much nicer Android crash screen
- Android has ~ 97% support for pure ES6 code.
- Can create TypeScript typings automagically on android platform using --androidTypings command line.
Lots and lots of bug fixing in all the repo's.
First of all to upgrade is done is a couple steps:
> npm install -g nativescript@latest
> npm install tns-core-modules@latest --save
> tns platform remove android
> tns platform add android
> tns platform remove ios
> tns platform add ios
Then you can type
tns info and verify that everything says v2.4.x
- iOS failing to build, older projects: v2.4 requires you to have the Info.plist file in the app_resources/ios folder. The simplist way to fix this is to create a new project and then replace your app_resources with the new app_resources folder. If you have any resources you have manually added or any changes to any files make sure you copy them out before you delete the old app_resources folder. I would highly recommend you do NOT merge them as you might get some weird behavior from the old resources in the old format vs the new resources in the newer layout.
- iOS requires CocoaPods v1.0 or later. This is not a NativeScript issue so much as the Cocoapod infrastructure no longer allows anything older than 1.0..
- Android failing to build with some plugins (like NativeScript-Telerik-Ui). with the error Multiple dex files define Landroid/support/v4/accessibility
- Android failing with snapshot error, install the nativescript snapshot support via
npm install nativescript-dev-android-snapshot@latest --save-dev
- TNS no longer building your TypeScript files or livesync'ing any of your TS files.