{"id":488,"date":"2017-03-27T22:13:03","date_gmt":"2017-03-27T22:13:03","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=488"},"modified":"2017-03-27T23:33:41","modified_gmt":"2017-03-27T23:33:41","slug":"nativescript-3-0-sneak-peek-and-what-it-entails-for-plugin-developers","status":"publish","type":"post","link":"https:\/\/fluentreports.com\/blog\/?p=488","title":{"rendered":"NativeScript 3.0 Sneak Peek and what it entails for Plugin developers."},"content":{"rendered":"<p>For those who are not aware, v3.0 of NativeScript is the next major version that will be released.\u00a0 It has been being worked on for several months now as it has parts of it have been completely rewritten to enhance speed of the framework in a number of areas.\u00a0\u00a0\u00a0 Some parts of it have undergone radical changes in design, and as such will require changes to plugins to make them compatible.<\/p>\n<p>Unfortunately these changes are a breaking change and will mess up the plugins for a while...<\/p>\n<p>Some pre-release information has trickled out and as such the plugin developers needs to be made aware of these changes, so we can start getting a jump on these changes...<\/p>\n<p>The biggest issue is any plugins that deals with any properties, or stylers has been completely changed. \u00a0 These plugins will HAVE to be changed to support 3.0.\u00a0\u00a0 This means your plugin will no longer be NS &lt;= 2.5 compatible, these are BREAKING changes.<\/p>\n<p>&nbsp;<\/p>\n<h3>Plugin Sites and the Package.json<\/h3>\n<p>As an aside if your plugin doesn't have any breaking changes and can continue to work fine in all versions of NS; then I am asking you to add a new flag to your package.json file to flag that this plugin is 3.0 compatible but doesn't require 3.0.<\/p>\n<p>Your package JSON NativeScript section should look like this:<br \/>\n<pre>&quot;nativescript&quot;: {\n&nbsp;&nbsp; &quot;platforms&quot;: {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;android&quot;: &quot;2.3.0&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ios&quot;: &quot;2.3.0&quot;\n&nbsp;&nbsp;&nbsp;&nbsp;},\n&nbsp;&nbsp;&nbsp;&nbsp;&quot;plugin&quot;: {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;nan&quot;: &quot;false&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;core3&quot;: &quot;true&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;pan&quot;: &quot;true&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;wrapper&quot;: &quot;ios&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;category&quot;: &quot;visual&quot;\n&nbsp;&nbsp;&nbsp;&nbsp;}\n },<\/pre><br \/>\nThe additional <strong>\"plugin\"<\/strong> structure is being introduced\u00a0 to try and capture the data that has been missing from the plugin infrastructure.\u00a0 At this moment each item is totally optional.\u00a0\u00a0 However, this will allow the plugin sites to categories and filter the plugins based on criteria's that are important to subsets of the users using the plugin sites.\u00a0 Please see: <a href=\"http:\/\/fluentreports.com\/blog\/?p=489\">http:\/\/fluentreports.com\/blog\/?p=489<\/a> for more details on the new \"plugin\" structure proposal.<\/p>\n<p>&nbsp;<\/p>\n<h3>Back to the breaking Changes<\/h3>\n<p>The first resource is that some of the NativeScript team produced a video last week <a href=\"https:\/\/youtu.be\/bwO3cYPb4zQ\">https:\/\/youtu.be\/bwO3cYPb4zQ <\/a>which will give a decent overview of the changes.<\/p>\n<p><iframe loading=\"lazy\" title=\"NativeScript 3.0 Sneak Peek\" width=\"750\" height=\"422\" src=\"https:\/\/www.youtube.com\/embed\/bwO3cYPb4zQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>The developers working on the 3.0 project gave a run down of the changes and how they benefit us and\/or what changes we need to be concerned about.<\/p>\n<p>The second resource, which I find to be a bit more valuable is this document that is in the source repo.\u00a0 <a href=\"https:\/\/github.com\/nativescript\/nativescript\/blob\/master\/Modules30Changes.md\">https:\/\/github.com\/nativescript\/nativescript\/blob\/master\/Modules30Changes.md<\/a><\/p>\n<p>They used this document in the above video; but since they only covered an overview and this documents has all the nitty-gritty details.<\/p>\n<p>For this to be a smooth transition I really strongly encourage you on the \"core3\" attribute be used if you are not just bumping your platforms to 3.0.0. \u00a0\u00a0 \u00a0 I will be automatically filtering out plugins that I believe are only 2.0 for 2.0 mode and 3.0 for 3.0 mode.\u00a0 So\u00a0 having things tagged correctly will help the end users have a much more painless transition.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those who are not aware, v3.0 of NativeScript is the next major version that will be released.\u00a0 It has been being worked on for several months now as it has parts of it have been completely rewritten to enhance speed of the framework in a number of areas.\u00a0\u00a0\u00a0 Some parts of it have undergone&hellip; <a class=\"more-link\" href=\"https:\/\/fluentreports.com\/blog\/?p=488\">Continue reading <span class=\"screen-reader-text\">NativeScript 3.0 Sneak Peek and what it entails for Plugin developers.<\/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,51],"tags":[16,100,34],"class_list":["post-488","post","type-post","status-publish","format-standard","hentry","category-nativescript","category-plugins","tag-nativescript","tag-ns-3-0","tag-plugins","entry"],"_links":{"self":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/488","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=488"}],"version-history":[{"count":1,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/488\/revisions"}],"predecessor-version":[{"id":491,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/488\/revisions\/491"}],"wp:attachment":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}