{"id":1085,"date":"2019-11-05T19:27:07","date_gmt":"2019-11-05T19:27:07","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=1085"},"modified":"2019-11-06T20:53:30","modified_gmt":"2019-11-06T20:53:30","slug":"nativescript-6-2-0-released","status":"publish","type":"post","link":"https:\/\/fluentreports.com\/blog\/?p=1085","title":{"rendered":"NativeScript 6.2.0 Released"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">NativeScript 6.20 has several fixes, and finally added the long awaited Scoped packages.   <strong>UPDATE<\/strong> Scoped packages apparently breaks some things.  See <a href=\"http:\/\/fluentreports.com\/blog\/?p=1092\">here<\/a> for more info on how to deal with it.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"395\" height=\"394\" src=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2019\/11\/ns620.png\" alt=\"\" class=\"wp-image-1090\" srcset=\"https:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2019\/11\/ns620.png 395w, https:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2019\/11\/ns620-150x150.png 150w, https:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2019\/11\/ns620-300x300.png 300w\" sizes=\"auto, (max-width: 395px) 100vw, 395px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Scoped packages; are where you can now do <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>const label = require(&quot;@nativescript\/core\/ui\/label&quot;<\/code> rather than the older <code>const label = require(&quot;tns-core-modules\/ui\/label&quot;);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This makes things a lot cleaner and over time more times should end up in the @nativescript namespace.   Currently in the <code>@nativescript<\/code> namespace is:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Core Modules<\/li><li>Theme<\/li><li>Angular<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Core Modules<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Since they added the  <code>ns-root<\/code>, <code>ns-landscape<\/code>, <code>ns-phone<\/code>, etc; in the prior version of NativeScript they have added even more css functionality in this version.  <code>ns-light<\/code> and <code>ns-dark<\/code> are now added values which you can use to select specific theme color rules.  They are added depending on the devices theme.  Along with that change,  more css optimizations, including hsla color support were added.    A long awaited and very welcome fix to allow values to be reset to default when css rules are disabled was also finally done.   Overall just the CSS fixes are worth the price.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another cool change is they updated they revampled the android transition code.  Should be better and more customizable.  In addition Android also got <code>ContentInset<\/code> properties on the <code>ActionBar<\/code>.  And iOS got <code>selectedSegmentTintColor<\/code> on the Segment bar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, the awesome community PR that was snuck into this release is Peter Staev's async read\/write addition.  <code>readAsync<\/code> and <code>writeAsync<\/code> allow async access to the file system.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CLI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The CLI team has fixed several outstanding bugs; things like Asset generation, several webpack issues, cocoapod fixes.   <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">V8<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I'm going to create this new v8 Section, because Android and soon iOS will both be using the same v8 engine.  v8 was upgraded to v7.7 which adds:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Lazy feedback allocation - this reduces the memory load of the v8 engine, which is always good to have on mobile devices<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Android<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Android team kept busy this month;<br>- They improved the error logging. <br>-  Added Kotlin extension function support<br>- Added JSONObject support<br>- Upgraded to V8 7.7 (See v8 section)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IOS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Fixed a Mashalling issue from \"unsigned char *\"<br>Fixed losing some exceptions in TS from runtime<br><br>A lot of changes to the new v8 version of the iOS runtime that is still in alpha testing to eventually replace the JSCore version...  This new runtime has pretty close to the same feature parity as the Android versoon.     I'm sure the iOS team would LOVE you all to test out this runtime on your apps to verify they work properly -- you can do so by using <code>tns platform add ios@alpha-v8<\/code> to tell it to use the v8 runtime.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Updating NativeScript<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To get updated; you first need to do:<br><strong>npm i -g nativescript@latest<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To update a project; you need to do the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Latest Runtimes:<br><strong>tns platform remove android &amp;&amp; tns platform add android@latest<\/strong><br><strong>tns platform remove ios &amp;&amp; tns platform add ios@latest<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Latest Core modules:<br><strong>npm r tns-core-modules --save<\/strong><br><strong>npm i tns-core-modules@latest --save<\/strong><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install Webpack support:<br><strong>npm i nativescript-dev-webpack@latest --save-dev<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install latest NativeScript Angular plugin<br><strong>npm i nativescript-angular@latest --save<\/strong><br>You will then need to install the actual angular bits; which as of this post v6 is currently supported.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The addition of t additional analytics\/tracking to the CLI reminded me; you can disable it permanently; if you value your privacy by doing:<br><strong>tns usage-reporting disable &amp;&amp; tns error-reporting disable<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NativeScript 6.20 has several fixes, and finally added the long awaited Scoped packages. UPDATE Scoped packages apparently breaks some things. See here for more info on how to deal with it. Scoped packages; are where you can now do const label = require(&quot;@nativescript\/core\/ui\/label&quot; rather than the older const label = require(&quot;tns-core-modules\/ui\/label&quot;); This makes things a&hellip; <a class=\"more-link\" href=\"https:\/\/fluentreports.com\/blog\/?p=1085\">Continue reading <span class=\"screen-reader-text\">NativeScript 6.2.0 Released<\/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":[1],"tags":[],"class_list":["post-1085","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1085"}],"version-history":[{"count":5,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1085\/revisions"}],"predecessor-version":[{"id":1098,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1085\/revisions\/1098"}],"wp:attachment":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}