{"id":622,"date":"2018-12-07T10:36:26","date_gmt":"2018-12-07T10:36:26","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=622"},"modified":"2018-12-14T19:51:37","modified_gmt":"2018-12-14T19:51:37","slug":"nativescript-5-1-0-released","status":"publish","type":"post","link":"http:\/\/fluentreports.com\/blog\/?p=622","title":{"rendered":"NativeScript 5.1.0 Released"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"395\" height=\"394\" src=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2018\/12\/nativescript-5.1.png\" alt=\"\" class=\"wp-image-628\" srcset=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2018\/12\/nativescript-5.1.png 395w, http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2018\/12\/nativescript-5.1-150x150.png 150w, http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2018\/12\/nativescript-5.1-300x300.png 300w\" sizes=\"auto, (max-width: 395px) 100vw, 395px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\" style=\"text-align:left\">For those who upgraded to 5.0.0 last month, it was a bit of a rough ride.&nbsp; A lot of cool features but a lot of weird corner case broken items.&nbsp; Fortunately since that point, they have released a several 5.0.x point releases which fixed several of the larger flaws.&nbsp; 5.1.0 actually fixes several of the non-critical smaller flaws and adds some cool new features...&nbsp; &nbsp;So if you were waiting to jump on the 5.x bandwagon, this should be the stable release you are waiting for!<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The quick list of some of the new features in 5.1<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Core Modules<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Enable modal dialog chaining in IOS <\/strong>- this allows you to have another dialog follow the first; anyone who has tried this in the past; know this was always a pain on iOS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>isScrollEnabled<\/strong> - This allows you to disable scrolling in the scrollbar component.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>androidSwipeEnabled<\/strong> - Allows you to disable swiping in the Android tabview control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the arrow keys to select an option, in this screen shot; the \"Plain JavaScript\" is chosen and so it is highlighted.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Android<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android AAB (Android App Bundle); support added!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">New package.json flag;&nbsp; <strong>suppressCallJSMethodExceptions<\/strong>: true\/false - enables suppression of the boolean errors when calling a native function.&nbsp; This could happen and crash the app.&nbsp; Now you can suppress them.&nbsp; (see&nbsp;<a href=\"http:\/\/fluentreports.com\/blog\/?p=581\">http:\/\/fluentreports.com\/blog\/?p=581<\/a> for more information)&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Java 8 Static method support on interfaces<\/strong>; allows NativeScript to call these Static functions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>extends<\/strong> should now work against standard javascript classes (i.e. non native Android classes); so that you can now do <code>class MyVue extends Vue {}; class blahComp extends MyView {};<\/code>&nbsp;and it will work properly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">iOS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CStrings are a bit more resilient when passing to a function that wants them as a pointer to read and possibly write.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Updated JavaScript engine to JSC 12.0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Several bugs when using hmr are fixed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yarn Support<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Adding lots more Analytics\/Tracking (Don't forget to disable this for your privacy: <strong>tns usage-reporting disable &amp;&amp; tns error-reporting disable<\/strong>)<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\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\">That will get you the latest version of NativeScript CLI; once you have it; do a \"tns --version\" and verify it prints out \"5.1.x\".&nbsp; Then do a \"<strong>tns doctor<\/strong>\" to verify your environment is up to date and has all the newest support tools you need for a successful build.&nbsp;&nbsp; <\/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 &amp; HMR support:<br><strong>npm i nativescript-dev-webpack@latest --save-dev<\/strong><br>Note: you need to have nativescript-dev-webpack as a development dependency for HMR to work.&nbsp;&nbsp; <br><\/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 all the 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\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Known issues<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>App Resume on Android can still crash in some situations. (Better than in 5.0)<\/li><li>Console.log may stop working when using HMR<\/li><li>HMR does NOT currently work with local plugin development out of the box. (See: <a href=\"https:\/\/github.com\/NativeScript\/nativescript-dev-webpack\/issues\/656\">https:\/\/github.com\/NativeScript\/nativescript-dev-webpack\/issues\/656<\/a>)<br><br><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>For those who upgraded to 5.0.0 last month, it was a bit of a rough ride.&nbsp; A lot of cool features but a lot of weird corner case broken items.&nbsp; Fortunately since that point, they have released a several 5.0.x point releases which fixed several of the larger flaws.&nbsp; 5.1.0 actually fixes several of the&hellip; <a class=\"more-link\" href=\"http:\/\/fluentreports.com\/blog\/?p=622\">Continue reading <span class=\"screen-reader-text\">NativeScript 5.1.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":[3,15],"tags":[16,60],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-javascript","category-nativescript","tag-nativescript","tag-upgrade","entry"],"_links":{"self":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/622","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=622"}],"version-history":[{"count":3,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":646,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions\/646"}],"wp:attachment":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}