{"id":353,"date":"2016-08-10T17:31:16","date_gmt":"2016-08-10T17:31:16","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=353"},"modified":"2016-08-12T07:11:28","modified_gmt":"2016-08-12T07:11:28","slug":"nativescript-version-2-2-0-released","status":"publish","type":"post","link":"http:\/\/fluentreports.com\/blog\/?p=353","title":{"rendered":"NativeScript: Version 2.2.0 released"},"content":{"rendered":"<p><a href=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/08\/ns-2.2.0.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-357 alignleft\" src=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/08\/ns-2.2.0.png\" alt=\"ns-2.2.0\" width=\"386\" height=\"386\" srcset=\"http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/08\/ns-2.2.0.png 600w, http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/08\/ns-2.2.0-150x150.png 150w, http:\/\/fluentreports.com\/blog\/wp-content\/uploads\/2016\/08\/ns-2.2.0-300x300.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/a>For those living in a dungeon hacking out code; guess what was released by those fine wizards at Telerik today!\u00a0\u00a0\u00a0\u00a0 Yes, you got it - v2.2.0 of NativeScript is now available!\u00a0\u00a0 Upgrade Instructions below.<\/p>\n<p>As usual; if you run into any issues I will be putting any common issues at the bottom of this post as I and others run into them....<\/p>\n<h2><\/h2>\n<h2>New or Fixed Features:<\/h2>\n<ul>\n<li>Android now properly supports some the of the Java classes that were broken in 2.1 (Major)<\/li>\n<li>Nested Bindables<\/li>\n<li>Letter Spacing is now all in EM Units (CSS: <code>letter-spacing<\/code>)<\/li>\n<li>CSS supports new properties, more selectors and even <a href=\"http:\/\/fluentreports.com\/blog\/?p=363\">pseudo selectors <\/a>(Major)<\/li>\n<li>Android<a href=\"https:\/\/github.com\/NativeScript\/docs\/blob\/master\/publishing\/creating-launch-screens-android.md\"> Launch Screen <\/a>Support<\/li>\n<li>Observable's are now auto-nesting (this can cause a breaking changes -- see known issues below)<\/li>\n<\/ul>\n<p>A Lot of other smaller bug fixes and enhancements went into place; unfortunately the really big feature for 2.2.0 has slipped -- <strong>threads<\/strong>.\u00a0\u00a0 It was bigger than a single point release could handle; I've seen progress on both Android and iOS on this front; so I have high hopes it will make it in 2.3.0...<\/p>\n<h2>Upgrading:<\/h2>\n<p>First of all to upgrade is done is a couple steps:<br \/>\n&gt; <strong>npm install -g nativescript<\/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.2.x<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Common Issues<\/strong><\/h2>\n<h3>Nested Observables might throw an error<\/h3>\n<p><pre><code>(iOS) TypeError: Cannot set property &#039;disableNotifications&#039; of undefined\n(Android) TypeError: undefined is not an object<\/code><\/pre><\/p>\n<p>If you have objects like<br \/>\n<pre><code>var x = new Observable({\ny: new ObservableArray([])\n});<\/code><\/pre><\/p>\n<p>This will probably throw the above error; eliminate the nesting; and make the structure like this:<\/p>\n<p><pre><code>var x = new Observable({\ny: []\n});<\/code><\/pre><\/p>\n<p>Github issue: <a href=\"https:\/\/github.com\/NativeScript\/NativeScript\/issues\/2457\">https:\/\/github.com\/NativeScript\/NativeScript\/issues\/2457<\/a><\/p>\n<h3>x86_64 bit Emulator on iOS might crash on code that is fine.<\/h3>\n<p>Error:<br \/>\n<pre>Service exited due to signal: Segmentation fault: 11<\/pre><br \/>\nSolution: Switch to a 32bit emulator like the iPhone 4s.<\/p>\n<p>Github Issue: <a href=\"https:\/\/github.com\/NativeScript\/ios-runtime\/issues\/622\">https:\/\/github.com\/NativeScript\/ios-runtime\/issues\/622<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Angular 2 cssClasses Incompatibility<\/h3>\n<p><pre>ORIGINAL EXCEPTION: TypeError: _this.cssClasses(...).set is not a function<\/pre><br \/>\nYou need to upgrade your NativeScript-Angular version to the latest version; the older version which worked with v2.1.0 of NativeScript is incompatible with v2.2.0. You should be able to do a<\/p>\n<p>&gt;<strong> npm install nativescipt-angular@latest --save<\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those living in a dungeon hacking out code; guess what was released by those fine wizards at Telerik today!\u00a0\u00a0\u00a0\u00a0 Yes, you got it - v2.2.0 of NativeScript is now available!\u00a0\u00a0 Upgrade Instructions below. As usual; if you run into any issues I will be putting any common issues at the bottom of this post&hellip; <a class=\"more-link\" href=\"http:\/\/fluentreports.com\/blog\/?p=353\">Continue reading <span class=\"screen-reader-text\">NativeScript: Version 2.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":[15,39,1],"tags":[77,16,60],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-nativescript","category-tips","category-uncategorized","tag-angular","tag-nativescript","tag-upgrade","entry"],"_links":{"self":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/353","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=353"}],"version-history":[{"count":9,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":373,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/353\/revisions\/373"}],"wp:attachment":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}