{"id":419,"date":"2016-11-16T16:36:18","date_gmt":"2016-11-16T16:36:18","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=419"},"modified":"2016-11-24T15:36:36","modified_gmt":"2016-11-24T15:36:36","slug":"nativescript-2-4-0-new-features","status":"publish","type":"post","link":"http:\/\/fluentreports.com\/blog\/?p=419","title":{"rendered":"NativeScript 2.4.0 - New Features"},"content":{"rendered":"<p><a href=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/11\/ns-version240.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-424 alignright\" src=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/11\/ns-version240.png\" alt=\"ns-version240\" width=\"424\" height=\"424\" srcset=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/11\/ns-version240.png 600w, http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/11\/ns-version240-150x150.png 150w, http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/11\/ns-version240-300x300.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a>Some of you might have seen the all New version 2.4.0 has been released today.\u00a0\u00a0 This has been a release that has taken a bit of time to get right, but it is finally out!\u00a0 Wooo Hoooo!!!<\/p>\n<p>Some of the new features<\/p>\n<ul>\n<li><a href=\"http:\/\/fluentreports.com\/blog\/?p=416\">NativeScript Workers<\/a><\/li>\n<li>Per-Side borders<\/li>\n<li>Flexbox layout<\/li>\n<li>Android Snapshots on Release build (faster app start time)<\/li>\n<li>Added \"import\" to point to the JS file<\/li>\n<li>More pseudo selectors: <strong>button now supports:<\/strong> <strong>pressed<\/strong>, <strong>active<\/strong> and <strong>highlighted<\/strong>, and <strong>views<\/strong> <strong>descendants<\/strong> support <strong>disabled.<\/strong><\/li>\n<li><strong>Segmented Bar<\/strong> now has a new css property:\u00a0 <em>selected-background-color<\/em><\/li>\n<li><strong>TabView<\/strong> now has new CSS properies: <em>tabTextColor<\/em>, <em>tabBackgroundColor<\/em>, <em>selectedTabTextColor<\/em>, and <em>androidSelectedTabHighlightedColor<\/em><\/li>\n<li>Some CSS properties now support % sizes:\u00a0 <em>height<\/em>, <em>width<\/em>, <em>margin-left<\/em>, <em>margin-top<\/em>, <em>margin-right<\/em>, <em>margin-bottom<\/em>, <em>margin<\/em>.<\/li>\n<li>Image Capture allows rotation.<\/li>\n<li>Camera module now a plugin (Removes a permission)<\/li>\n<li>Brand new Theme!<\/li>\n<li>Reduce the size of the Android App<\/li>\n<li>Much nicer Android crash screen<\/li>\n<li>Faster <code>tns prepare<\/code><\/li>\n<li>Android has ~ 97% support for pure ES6 code.<\/li>\n<li>Can create TypeScript typings automagically on android platform using --androidTypings command line.<\/li>\n<\/ul>\n<p>Lots and lots of bug fixing in all the repo's.<\/p>\n<h2>Upgrading (Core):<\/h2>\n<p>First of all to upgrade is done is a couple steps:<br \/>\n&gt; <strong>npm install -g nativescript@latest<\/strong><br \/>\n&gt; <strong>npm install tns-core-modules@latest --save<\/strong><\/p>\n<p>For Android:<br \/>\n&gt; <strong>tns platform remove android<\/strong><br \/>\n&gt; <strong>tns platform add android<\/strong><\/p>\n<p>For iOS<br \/>\n&gt; <strong>tns platform remove ios<\/strong><br \/>\n&gt; <strong>tns platform add ios<\/strong><\/p>\n<p>Then you can type <strong><code>tns info<\/code><\/strong> and verify that everything says v2.4.x<\/p>\n<h2>Common Issues:<\/h2>\n<ul>\n<li>iOS failing to build, older projects:\u00a0 v2.4 requires you to have the Info.plist file in the app_resources\/ios folder.\u00a0\u00a0\u00a0 The simplist way to fix this is to create a new project and then replace your app_resources with the new app_resources folder.\u00a0 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.\u00a0 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.<\/li>\n<li>iOS requires CocoaPods v1.0 or later.\u00a0\u00a0 This is not a NativeScript issue so much as the Cocoapod infrastructure no longer allows anything older than 1.0..<\/li>\n<li>Android failing to build with some plugins (like NativeScript-Telerik-Ui). with the error <a href=\"https:\/\/www.patreon.com\/posts\/nativescript-2-4-7320589\"><em>Multiple dex files define Landroid\/support\/v4\/accessibility<\/em><\/a><\/li>\n<li>Android failing with snapshot error, install the nativescript snapshot support via<br \/>\n<strong>npm install nativescript-dev-android-snapshot@latest --save-dev<\/strong><\/li>\n<li>TNS no longer building your <a href=\"https:\/\/www.patreon.com\/posts\/nativescript-2-4-7320867\">TypeScript files or livesync'ing any of your TS files<\/a>.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some of you might have seen the all New version 2.4.0 has been released today.\u00a0\u00a0 This has been a release that has taken a bit of time to get right, but it is finally out!\u00a0 Wooo Hoooo!!! Some of the new features NativeScript Workers Per-Side borders Flexbox layout Android Snapshots on Release build (faster app&hellip; <a class=\"more-link\" href=\"http:\/\/fluentreports.com\/blog\/?p=419\">Continue reading <span class=\"screen-reader-text\">NativeScript 2.4.0 - New Features<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[15,39],"tags":[16,87],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-nativescript","category-tips","tag-nativescript","tag-updates","entry"],"_links":{"self":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=419"}],"version-history":[{"count":14,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":453,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions\/453"}],"wp:attachment":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}